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

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git

commit f9892bd3d39291fb0effdc52500f1d1ae4fe19f4
Author: yiguolei <676222...@qq.com>
AuthorDate: Sun Aug 25 23:03:03 2024 +0800

    [enhancement](thrift) add value number to thrift definition for enum type 
(#39880)
    
    ## Proposed changes
    
    Issue Number: close #xxx
    
    <!--Describe your changes.-->
    
    ---------
    
    Co-authored-by: yiguolei <yiguo...@gmail.com>
---
 gensrc/thrift/AgentService.thrift        |   2 +-
 gensrc/thrift/BackendService.thrift      |  28 +++----
 gensrc/thrift/Descriptors.thrift         | 137 ++++++++++++++++---------------
 gensrc/thrift/PaloInternalService.thrift |   4 +-
 4 files changed, 86 insertions(+), 85 deletions(-)

diff --git a/gensrc/thrift/AgentService.thrift 
b/gensrc/thrift/AgentService.thrift
index 767ede9017a..8f6f710350a 100644
--- a/gensrc/thrift/AgentService.thrift
+++ b/gensrc/thrift/AgentService.thrift
@@ -569,7 +569,7 @@ struct TTopicItem {
 }
 
 enum TTopicType {
-    RESOURCE
+    RESOURCE = 0
 }
 
 struct TTopicUpdate {
diff --git a/gensrc/thrift/BackendService.thrift 
b/gensrc/thrift/BackendService.thrift
index 1e52d94f7bb..058f84aadc9 100644
--- a/gensrc/thrift/BackendService.thrift
+++ b/gensrc/thrift/BackendService.thrift
@@ -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 {
@@ -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 {
@@ -293,8 +293,8 @@ struct TWorkloadCondition {
 }
 
 enum TWorkloadActionType {
-    MOVE_QUERY_TO_GROUP
-    CANCEL_QUERY
+    MOVE_QUERY_TO_GROUP = 0
+    CANCEL_QUERY = 1
 }
 
 struct TWorkloadAction {
diff --git a/gensrc/thrift/Descriptors.thrift b/gensrc/thrift/Descriptors.thrift
index 589b46c1490..e11160caa7f 100644
--- a/gensrc/thrift/Descriptors.thrift
+++ b/gensrc/thrift/Descriptors.thrift
@@ -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.
diff --git a/gensrc/thrift/PaloInternalService.thrift 
b/gensrc/thrift/PaloInternalService.thrift
index a75e06f358b..b3000b66ea9 100644
--- a/gensrc/thrift/PaloInternalService.thrift
+++ b/gensrc/thrift/PaloInternalService.thrift
@@ -82,8 +82,8 @@ struct TResourceLimit {
 }
 
 enum TSerdeDialect {
-  DORIS,
-  PRESTO
+  DORIS = 0,
+  PRESTO = 1
 }
 
 // Query options that correspond to PaloService.PaloQueryOptions,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to