diff --git a/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift b/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift index 3efd56a998..72ccdd1a0f 100644 --- a/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift +++ b/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift @@ -437,66 +437,6 @@ struct CreationMetadata { 6: optional i64 materializationTime } -// table information -struct Table { - 1: string tableName, // name of the table - 2: string dbName, // database name ('default') - 3: string owner, // owner of this table - 4: i32 createTime, // creation time of the table - 5: i32 lastAccessTime, // last access time (usually this will be filled from HDFS and shouldn't be relied on) - 6: i32 retention, // retention time - 7: StorageDescriptor sd, // storage descriptor of the table - 8: list partitionKeys, // partition keys of the table. only primitive types are supported - 9: map parameters, // to store comments or any other user level parameters - 10: string viewOriginalText, // original view text, null for non-view - 11: string viewExpandedText, // expanded view text, null for non-view - 12: string tableType, // table type enum, e.g. EXTERNAL_TABLE - 13: optional PrincipalPrivilegeSet privileges, - 14: optional bool temporary=false, - 15: optional bool rewriteEnabled, // rewrite enabled or not - 16: optional CreationMetadata creationMetadata, // only for MVs, it stores table names used and txn list at MV creation - 17: optional string catName, // Name of the catalog the table is in - 18: optional PrincipalType ownerType = PrincipalType.USER, // owner type of this table (default to USER for backward compatibility) - 19: optional i64 writeId=-1, - 20: optional bool isStatsCompliant, - 21: optional ColumnStatistics colStats, // column statistics for table - 22: optional byte accessType, - 23: optional list requiredReadCapabilities, - 24: optional list requiredWriteCapabilities - 25: optional i64 id, // id of the table. It will be ignored if set. It's only for - // read purposed -} - -struct Partition { - 1: list values // string value is converted to appropriate partition key type - 2: string dbName, - 3: string tableName, - 4: i32 createTime, - 5: i32 lastAccessTime, - 6: StorageDescriptor sd, - 7: map parameters, - 8: optional PrincipalPrivilegeSet privileges, - 9: optional string catName, - 10: optional i64 writeId=-1, - 11: optional bool isStatsCompliant, - 12: optional ColumnStatistics colStats // column statistics for partition -} - -struct PartitionWithoutSD { - 1: list values // string value is converted to appropriate partition key type - 2: i32 createTime, - 3: i32 lastAccessTime, - 4: string relativePath, - 5: map parameters, - 6: optional PrincipalPrivilegeSet privileges -} - -struct PartitionSpecWithSharedSD { - 1: list partitions, - 2: StorageDescriptor sd, -} - - // column statistics struct BooleanColumnStatsData { 1: required i64 numTrues, @@ -608,6 +548,66 @@ struct ColumnStatistics { 4: optional string engine } +// table information +struct Table { + 1: string tableName, // name of the table + 2: string dbName, // database name ('default') + 3: string owner, // owner of this table + 4: i32 createTime, // creation time of the table + 5: i32 lastAccessTime, // last access time (usually this will be filled from HDFS and shouldn't be relied on) + 6: i32 retention, // retention time + 7: StorageDescriptor sd, // storage descriptor of the table + 8: list partitionKeys, // partition keys of the table. only primitive types are supported + 9: map parameters, // to store comments or any other user level parameters + 10: string viewOriginalText, // original view text, null for non-view + 11: string viewExpandedText, // expanded view text, null for non-view + 12: string tableType, // table type enum, e.g. EXTERNAL_TABLE + 13: optional PrincipalPrivilegeSet privileges, + 14: optional bool temporary=false, + 15: optional bool rewriteEnabled, // rewrite enabled or not + 16: optional CreationMetadata creationMetadata, // only for MVs, it stores table names used and txn list at MV creation + 17: optional string catName, // Name of the catalog the table is in + 18: optional PrincipalType ownerType = PrincipalType.USER, // owner type of this table (default to USER for backward compatibility) + 19: optional i64 writeId=-1, + 20: optional bool isStatsCompliant, + 21: optional ColumnStatistics colStats, // column statistics for table + 22: optional byte accessType, + 23: optional list requiredReadCapabilities, + 24: optional list requiredWriteCapabilities + 25: optional i64 id, // id of the table. It will be ignored if set. It's only for + // read purposed +} + +struct Partition { + 1: list values // string value is converted to appropriate partition key type + 2: string dbName, + 3: string tableName, + 4: i32 createTime, + 5: i32 lastAccessTime, + 6: StorageDescriptor sd, + 7: map parameters, + 8: optional PrincipalPrivilegeSet privileges, + 9: optional string catName, + 10: optional i64 writeId=-1, + 11: optional bool isStatsCompliant, + 12: optional ColumnStatistics colStats // column statistics for partition +} + +struct PartitionWithoutSD { + 1: list values // string value is converted to appropriate partition key type + 2: i32 createTime, + 3: i32 lastAccessTime, + 4: string relativePath, + 5: map parameters, + 6: optional PrincipalPrivilegeSet privileges +} + +struct PartitionSpecWithSharedSD { + 1: list partitions, + 2: StorageDescriptor sd, +} + + struct PartitionListComposingSpec { 1: list partitions } @@ -1771,6 +1771,11 @@ struct ScheduledQueryPollRequest { 1: required string clusterNamespace } +struct ScheduledQueryKey { + 1: required string scheduleName, + 2: required string clusterNamespace, +} + struct ScheduledQueryPollResponse { 1: optional ScheduledQueryKey scheduleKey, 2: optional i64 executionId, @@ -1778,11 +1783,6 @@ struct ScheduledQueryPollResponse { 4: optional string user, } -struct ScheduledQueryKey { - 1: required string scheduleName, - 2: required string clusterNamespace, -} - struct ScheduledQuery { 1: required ScheduledQueryKey scheduleKey, 2: optional bool enabled,