Skip to content

Commit

Permalink
[enhancement](thrift) add value number to thrift definition for enum …
Browse files Browse the repository at this point in the history
…type (apache#39880)

## Proposed changes

Issue Number: close #xxx

<!--Describe your changes.-->

---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
  • Loading branch information
yiguolei and Doris-Extras authored Aug 25, 2024
1 parent 116130e commit ce9cd66
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 85 deletions.
2 changes: 1 addition & 1 deletion gensrc/thrift/AgentService.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ struct TTopicItem {
}

enum TTopicType {
RESOURCE
RESOURCE = 0
}

struct TTopicUpdate {
Expand Down
28 changes: 14 additions & 14 deletions gensrc/thrift/BackendService.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ struct TQueryIngestBinlogResult {
}

enum TTopicInfoType {
WORKLOAD_GROUP
MOVE_QUERY_TO_GROUP
WORKLOAD_SCHED_POLICY
WORKLOAD_GROUP = 0
MOVE_QUERY_TO_GROUP = 1
WORKLOAD_SCHED_POLICY = 2
}

struct TWorkloadGroupInfo {
Expand All @@ -272,18 +272,18 @@ struct TWorkloadGroupInfo {
}

enum TWorkloadMetricType {
QUERY_TIME
BE_SCAN_ROWS
BE_SCAN_BYTES
QUERY_BE_MEMORY_BYTES
QUERY_TIME = 0
BE_SCAN_ROWS = 1
BE_SCAN_BYTES = 2
QUERY_BE_MEMORY_BYTES = 3
}

enum TCompareOperator {
EQUAL
GREATER
GREATER_EQUAL
LESS
LESS_EQUAL
EQUAL = 0
GREATER = 1
GREATER_EQUAL = 2
LESS = 3
LESS_EQUAL = 4
}

struct TWorkloadCondition {
Expand All @@ -293,8 +293,8 @@ struct TWorkloadCondition {
}

enum TWorkloadActionType {
MOVE_QUERY_TO_GROUP
CANCEL_QUERY
MOVE_QUERY_TO_GROUP = 0
CANCEL_QUERY = 1
}

struct TWorkloadAction {
Expand Down
137 changes: 69 additions & 68 deletions gensrc/thrift/Descriptors.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -77,83 +77,84 @@ struct TTupleDescriptor {
}

enum THdfsFileFormat {
TEXT,
LZO_TEXT,
RC_FILE,
SEQUENCE_FILE,
AVRO,
PARQUET
TEXT = 0,
LZO_TEXT = 1,
RC_FILE = 2,
SEQUENCE_FILE =3,
AVRO = 4,
PARQUET = 5
}

enum TSchemaTableType {
SCH_AUTHORS= 0,
SCH_CHARSETS,
SCH_COLLATIONS,
SCH_COLLATION_CHARACTER_SET_APPLICABILITY,
SCH_COLUMNS,
SCH_COLUMN_PRIVILEGES,
SCH_CREATE_TABLE,
SCH_ENGINES,
SCH_EVENTS,
SCH_FILES,
SCH_GLOBAL_STATUS,
SCH_GLOBAL_VARIABLES,
SCH_KEY_COLUMN_USAGE,
SCH_OPEN_TABLES,
SCH_PARTITIONS,
SCH_PLUGINS,
SCH_PROCESSLIST,
SCH_PROFILES,
SCH_REFERENTIAL_CONSTRAINTS,
SCH_PROCEDURES,
SCH_SCHEMATA,
SCH_SCHEMA_PRIVILEGES,
SCH_SESSION_STATUS,
SCH_SESSION_VARIABLES,
SCH_STATISTICS,
SCH_STATUS,
SCH_TABLES,
SCH_TABLE_CONSTRAINTS,
SCH_TABLE_NAMES,
SCH_TABLE_PRIVILEGES,
SCH_TRIGGERS,
SCH_USER_PRIVILEGES,
SCH_VARIABLES,
SCH_VIEWS,
SCH_INVALID,
SCH_ROWSETS,
SCH_BACKENDS,
SCH_COLUMN_STATISTICS,
SCH_PARAMETERS,
SCH_METADATA_NAME_IDS,
SCH_PROFILING,
SCH_BACKEND_ACTIVE_TASKS,
SCH_ACTIVE_QUERIES,
SCH_WORKLOAD_GROUPS,
SCH_USER,
SCH_PROCS_PRIV,
SCH_WORKLOAD_POLICY,
SCH_TABLE_OPTIONS,
SCH_WORKLOAD_GROUP_PRIVILEGES,
SCH_WORKLOAD_GROUP_RESOURCE_USAGE,
SCH_TABLE_PROPERTIES;
SCH_AUTHORS = 0,
SCH_CHARSETS = 1,
SCH_COLLATIONS = 2,
SCH_COLLATION_CHARACTER_SET_APPLICABILITY = 3,
SCH_COLUMNS = 4,
SCH_COLUMN_PRIVILEGES = 5,
SCH_CREATE_TABLE = 6,
SCH_ENGINES = 7,
SCH_EVENTS = 8,
SCH_FILES = 9,
SCH_GLOBAL_STATUS = 10,
SCH_GLOBAL_VARIABLES = 11,
SCH_KEY_COLUMN_USAGE = 12,
SCH_OPEN_TABLES = 13,
SCH_PARTITIONS = 14,
SCH_PLUGINS = 15,
SCH_PROCESSLIST = 16,
SCH_PROFILES = 17,
SCH_REFERENTIAL_CONSTRAINTS = 18,
SCH_PROCEDURES = 19,
SCH_SCHEMATA = 20,
SCH_SCHEMA_PRIVILEGES = 21,
SCH_SESSION_STATUS = 22,
SCH_SESSION_VARIABLES = 23,
SCH_STATISTICS = 24,
SCH_STATUS = 25,
SCH_TABLES = 26,
SCH_TABLE_CONSTRAINTS = 27,
SCH_TABLE_NAMES = 28,
SCH_TABLE_PRIVILEGES = 29,
SCH_TRIGGERS = 30,
SCH_USER_PRIVILEGES = 31,
SCH_VARIABLES = 32,
SCH_VIEWS = 33,
SCH_INVALID = 34,
SCH_ROWSETS = 35
SCH_BACKENDS = 36,
SCH_COLUMN_STATISTICS = 37,
SCH_PARAMETERS = 38,
SCH_METADATA_NAME_IDS = 39,
SCH_PROFILING = 40,
SCH_BACKEND_ACTIVE_TASKS = 41,
SCH_ACTIVE_QUERIES = 42,
SCH_WORKLOAD_GROUPS = 43,
SCH_USER = 44,
SCH_PROCS_PRIV = 45,
SCH_WORKLOAD_POLICY = 46,
SCH_TABLE_OPTIONS = 47,
SCH_WORKLOAD_GROUP_PRIVILEGES = 48,
SCH_WORKLOAD_GROUP_RESOURCE_USAGE = 49,
SCH_TABLE_PROPERTIES = 50,
SCH_FILE_CACHE_STATISTICS = 51
}

enum THdfsCompression {
NONE,
DEFAULT,
GZIP,
DEFLATE,
BZIP2,
SNAPPY,
SNAPPY_BLOCKED // Used by sequence and rc files but not stored in the metadata.
NONE = 0,
DEFAULT = 1,
GZIP = 2,
DEFLATE = 3,
BZIP2 = 4,
SNAPPY = 5,
SNAPPY_BLOCKED = 6 // Used by sequence and rc files but not stored in the metadata.
}

enum TIndexType {
BITMAP,
INVERTED,
BLOOMFILTER,
NGRAM_BF
BITMAP = 0,
INVERTED = 1,
BLOOMFILTER = 2,
NGRAM_BF = 3
}

// Mapping from names defined by Avro to the enum.
Expand Down
4 changes: 2 additions & 2 deletions gensrc/thrift/PaloInternalService.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ struct TResourceLimit {
}

enum TSerdeDialect {
DORIS,
PRESTO
DORIS = 0,
PRESTO = 1
}

// Query options that correspond to PaloService.PaloQueryOptions,
Expand Down

0 comments on commit ce9cd66

Please sign in to comment.