This is an automated email from the ASF dual-hosted git repository.

nicholasjiang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-paimon-webui.git


The following commit(s) were added to refs/heads/main by this push:
     new d63da6b  [Improvement] Split MetaData module type (#114)
d63da6b is described below

commit d63da6bea06465389109914aca1142590280a9b3
Author: xiaomo <[email protected]>
AuthorDate: Wed Dec 13 10:56:21 2023 +0800

    [Improvement] Split MetaData module type (#114)
---
 paimon-web-ui-new/src/api/models/catalog/index.ts  |  4 +-
 .../catalog/{interface.ts => types/catalog.ts}     | 19 ---------
 .../catalog/{interface.ts => types/database.ts}    | 23 -----------
 .../catalog/{interface.ts => types/datafile.ts}    | 45 +++++++++-------------
 .../catalog/{interface.ts => types/index.ts}       | 36 ++++-------------
 .../catalog/{interface.ts => types/manifest.ts}    | 34 +++-------------
 .../catalog/{interface.ts => types/schema.ts}      | 38 ++++++++----------
 .../catalog/{interface.ts => types/snapshot.ts}    | 44 ++++++++-------------
 .../catalog/{interface.ts => types/table.ts}       | 18 ---------
 9 files changed, 65 insertions(+), 196 deletions(-)

diff --git a/paimon-web-ui-new/src/api/models/catalog/index.ts 
b/paimon-web-ui-new/src/api/models/catalog/index.ts
index 5f70f63..ae50657 100644
--- a/paimon-web-ui-new/src/api/models/catalog/index.ts
+++ b/paimon-web-ui-new/src/api/models/catalog/index.ts
@@ -16,10 +16,10 @@ specific language governing permissions and limitations
 under the License. */
 
 import httpRequest from '@/api/request'
-import type { Catalog, Database, Table, TableQuery } from './interface'
+import type { Catalog, Database, Table, TableQuery } from './types'
 import type { ResponseOptions } from '@/api/types'
 
-export * from './interface'
+export * from './types'
 
 // #region catalog-controller
 
diff --git a/paimon-web-ui-new/src/api/models/catalog/interface.ts 
b/paimon-web-ui-new/src/api/models/catalog/types/catalog.ts
similarity index 75%
copy from paimon-web-ui-new/src/api/models/catalog/interface.ts
copy to paimon-web-ui-new/src/api/models/catalog/types/catalog.ts
index 1965d4c..82b2088 100644
--- a/paimon-web-ui-new/src/api/models/catalog/interface.ts
+++ b/paimon-web-ui-new/src/api/models/catalog/types/catalog.ts
@@ -25,22 +25,3 @@ export interface Catalog {
   hiveUri?: string;
   hiveConfDir?: string;
 }
-
-export interface Database {
-  name: string;
-  catalogId: number;
-  catalogName: string;
-  description?: string;
-}
-
-export interface Table {
-  catalogId: number;
-  catalogName: string;
-  databaseName: string;
-  name?: string;
-}
-
-export interface TableQuery {
-  catalogId: number;
-  databaseName: string;
-}
diff --git a/paimon-web-ui-new/src/api/models/catalog/interface.ts 
b/paimon-web-ui-new/src/api/models/catalog/types/database.ts
similarity index 69%
copy from paimon-web-ui-new/src/api/models/catalog/interface.ts
copy to paimon-web-ui-new/src/api/models/catalog/types/database.ts
index 1965d4c..fe0859b 100644
--- a/paimon-web-ui-new/src/api/models/catalog/interface.ts
+++ b/paimon-web-ui-new/src/api/models/catalog/types/database.ts
@@ -15,32 +15,9 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License. */
 
-export interface Catalog {
-  id: number;
-  createTime: string;
-  updateTime?: string;
-  catalogType: string;
-  catalogName: string;
-  warehouse: string;
-  hiveUri?: string;
-  hiveConfDir?: string;
-}
-
 export interface Database {
   name: string;
   catalogId: number;
   catalogName: string;
   description?: string;
 }
-
-export interface Table {
-  catalogId: number;
-  catalogName: string;
-  databaseName: string;
-  name?: string;
-}
-
-export interface TableQuery {
-  catalogId: number;
-  databaseName: string;
-}
diff --git a/paimon-web-ui-new/src/api/models/catalog/interface.ts 
b/paimon-web-ui-new/src/api/models/catalog/types/datafile.ts
similarity index 60%
copy from paimon-web-ui-new/src/api/models/catalog/interface.ts
copy to paimon-web-ui-new/src/api/models/catalog/types/datafile.ts
index 1965d4c..b000c60 100644
--- a/paimon-web-ui-new/src/api/models/catalog/interface.ts
+++ b/paimon-web-ui-new/src/api/models/catalog/types/datafile.ts
@@ -15,32 +15,25 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License. */
 
-export interface Catalog {
-  id: number;
-  createTime: string;
-  updateTime?: string;
-  catalogType: string;
-  catalogName: string;
-  warehouse: string;
-  hiveUri?: string;
-  hiveConfDir?: string;
-}
-
-export interface Database {
-  name: string;
-  catalogId: number;
-  catalogName: string;
-  description?: string;
-}
+export interface Datafile {
+  bucket: number;
+  filePath: string;
+  fileFormat: string;
+  schemaId: string;
+  level: number;
+  recordCount: string;
+  fileSizeInBytes: string;
 
-export interface Table {
-  catalogId: number;
-  catalogName: string;
-  databaseName: string;
-  name?: string;
+  // TODO: JSON String
+  partition: string;
+  minKey: string;
+  maxKey: string;
+  nullValueCounts: string;
+  minValueStats: string;
+  maxValueStats: string;
+  
+  minSequenceNumber: string;
+  maxSequenceNumber: string;
+  creationTime: string;
 }
 
-export interface TableQuery {
-  catalogId: number;
-  databaseName: string;
-}
diff --git a/paimon-web-ui-new/src/api/models/catalog/interface.ts 
b/paimon-web-ui-new/src/api/models/catalog/types/index.ts
similarity index 60%
copy from paimon-web-ui-new/src/api/models/catalog/interface.ts
copy to paimon-web-ui-new/src/api/models/catalog/types/index.ts
index 1965d4c..d139af4 100644
--- a/paimon-web-ui-new/src/api/models/catalog/interface.ts
+++ b/paimon-web-ui-new/src/api/models/catalog/types/index.ts
@@ -15,32 +15,10 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License. */
 
-export interface Catalog {
-  id: number;
-  createTime: string;
-  updateTime?: string;
-  catalogType: string;
-  catalogName: string;
-  warehouse: string;
-  hiveUri?: string;
-  hiveConfDir?: string;
-}
-
-export interface Database {
-  name: string;
-  catalogId: number;
-  catalogName: string;
-  description?: string;
-}
-
-export interface Table {
-  catalogId: number;
-  catalogName: string;
-  databaseName: string;
-  name?: string;
-}
-
-export interface TableQuery {
-  catalogId: number;
-  databaseName: string;
-}
+export * from './catalog'
+export * from './database'
+export * from './table'
+export * from './schema'
+export * from './snapshot'
+export * from './manifest'
+export * from './datafile'
diff --git a/paimon-web-ui-new/src/api/models/catalog/interface.ts 
b/paimon-web-ui-new/src/api/models/catalog/types/manifest.ts
similarity index 60%
copy from paimon-web-ui-new/src/api/models/catalog/interface.ts
copy to paimon-web-ui-new/src/api/models/catalog/types/manifest.ts
index 1965d4c..1c312d7 100644
--- a/paimon-web-ui-new/src/api/models/catalog/interface.ts
+++ b/paimon-web-ui-new/src/api/models/catalog/types/manifest.ts
@@ -15,32 +15,10 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License. */
 
-export interface Catalog {
-  id: number;
-  createTime: string;
-  updateTime?: string;
-  catalogType: string;
-  catalogName: string;
-  warehouse: string;
-  hiveUri?: string;
-  hiveConfDir?: string;
-}
-
-export interface Database {
-  name: string;
-  catalogId: number;
-  catalogName: string;
-  description?: string;
-}
-
-export interface Table {
-  catalogId: number;
-  catalogName: string;
-  databaseName: string;
-  name?: string;
-}
-
-export interface TableQuery {
-  catalogId: number;
-  databaseName: string;
+export interface Manifest {
+  fileName: string;
+  fileSize: string;
+  numAddedFiles: string;
+  numDeletedFiles: string;
+  schemaId: string;
 }
diff --git a/paimon-web-ui-new/src/api/models/catalog/interface.ts 
b/paimon-web-ui-new/src/api/models/catalog/types/schema.ts
similarity index 63%
copy from paimon-web-ui-new/src/api/models/catalog/interface.ts
copy to paimon-web-ui-new/src/api/models/catalog/types/schema.ts
index 1965d4c..9f8b5d8 100644
--- a/paimon-web-ui-new/src/api/models/catalog/interface.ts
+++ b/paimon-web-ui-new/src/api/models/catalog/types/schema.ts
@@ -15,32 +15,24 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License. */
 
-export interface Catalog {
-  id: number;
-  createTime: string;
-  updateTime?: string;
-  catalogType: string;
-  catalogName: string;
-  warehouse: string;
-  hiveUri?: string;
-  hiveConfDir?: string;
+export interface Schema {
+  schemaId: string;
+  fields: SchemaField[];
+  partitionKeys: string;
+  primaryKeys: string;
+  comment: string;
+  option: SchemaOption[];
+  updateTime: string;
 }
 
-export interface Database {
+export interface SchemaField {
+  id: number;
   name: string;
-  catalogId: number;
-  catalogName: string;
-  description?: string;
-}
-
-export interface Table {
-  catalogId: number;
-  catalogName: string;
-  databaseName: string;
-  name?: string;
+  type: string;
+  comment?: string;
 }
 
-export interface TableQuery {
-  catalogId: number;
-  databaseName: string;
+export interface SchemaOption {
+  key: string;
+  value: string;
 }
diff --git a/paimon-web-ui-new/src/api/models/catalog/interface.ts 
b/paimon-web-ui-new/src/api/models/catalog/types/snapshot.ts
similarity index 60%
copy from paimon-web-ui-new/src/api/models/catalog/interface.ts
copy to paimon-web-ui-new/src/api/models/catalog/types/snapshot.ts
index 1965d4c..a5972b4 100644
--- a/paimon-web-ui-new/src/api/models/catalog/interface.ts
+++ b/paimon-web-ui-new/src/api/models/catalog/types/snapshot.ts
@@ -15,32 +15,20 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License. */
 
-export interface Catalog {
-  id: number;
-  createTime: string;
-  updateTime?: string;
-  catalogType: string;
-  catalogName: string;
-  warehouse: string;
-  hiveUri?: string;
-  hiveConfDir?: string;
-}
-
-export interface Database {
-  name: string;
-  catalogId: number;
-  catalogName: string;
-  description?: string;
-}
-
-export interface Table {
-  catalogId: number;
-  catalogName: string;
-  databaseName: string;
-  name?: string;
-}
-
-export interface TableQuery {
-  catalogId: number;
-  databaseName: string;
+export interface Snapshot {
+  snapshotId: string;
+  schemaId: string;
+  commitUser: string;
+  commitIdentifier: string;
+  commitKind: string;
+  commitTime: string;
+  baseManifestList: string;
+  deltaManifestList: string;
+  changelogManifestList: string;
+  totalRecordCount: string;
+  deltaRecordCount: string;
+  changelogRecordCount: string;
+  addedFileCount: number;
+  deletedFileCount: number;
+  watermark: string;
 }
diff --git a/paimon-web-ui-new/src/api/models/catalog/interface.ts 
b/paimon-web-ui-new/src/api/models/catalog/types/table.ts
similarity index 75%
rename from paimon-web-ui-new/src/api/models/catalog/interface.ts
rename to paimon-web-ui-new/src/api/models/catalog/types/table.ts
index 1965d4c..958d630 100644
--- a/paimon-web-ui-new/src/api/models/catalog/interface.ts
+++ b/paimon-web-ui-new/src/api/models/catalog/types/table.ts
@@ -15,24 +15,6 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License. */
 
-export interface Catalog {
-  id: number;
-  createTime: string;
-  updateTime?: string;
-  catalogType: string;
-  catalogName: string;
-  warehouse: string;
-  hiveUri?: string;
-  hiveConfDir?: string;
-}
-
-export interface Database {
-  name: string;
-  catalogId: number;
-  catalogName: string;
-  description?: string;
-}
-
 export interface Table {
   catalogId: number;
   catalogName: string;

Reply via email to