diff --git a/be/src/runtime/descriptors.cpp b/be/src/runtime/descriptors.cpp index bea11feb916f108..bba1378d8afaba6 100644 --- a/be/src/runtime/descriptors.cpp +++ b/be/src/runtime/descriptors.cpp @@ -138,6 +138,15 @@ std::string OlapTableDescriptor::debug_string() const { return out.str(); } +DictionaryTableDescriptor::DictionaryTableDescriptor(const TTableDescriptor& tdesc) + : TableDescriptor(tdesc) {} + +std::string DictionaryTableDescriptor::debug_string() const { + std::stringstream out; + out << "Dictionary(" << TableDescriptor::debug_string() << ")"; + return out.str(); +} + SchemaTableDescriptor::SchemaTableDescriptor(const TTableDescriptor& tdesc) : TableDescriptor(tdesc), _schema_table_type(tdesc.schemaTable.tableType) {} SchemaTableDescriptor::~SchemaTableDescriptor() = default; @@ -577,6 +586,9 @@ Status DescriptorTbl::create(ObjectPool* pool, const TDescriptorTable& thrift_tb case TTableType::TRINO_CONNECTOR_TABLE: desc = pool->add(new TrinoConnectorTableDescriptor(tdesc)); break; + case TTableType::DICTIONARY_TABLE: + desc = pool->add(new DictionaryTableDescriptor(tdesc)); + break; default: DCHECK(false) << "invalid table type: " << tdesc.tableType; } diff --git a/be/src/runtime/descriptors.h b/be/src/runtime/descriptors.h index b807c5675430383..329228067a79887 100644 --- a/be/src/runtime/descriptors.h +++ b/be/src/runtime/descriptors.h @@ -168,6 +168,12 @@ class OlapTableDescriptor : public TableDescriptor { std::string debug_string() const override; }; +class DictionaryTableDescriptor : public TableDescriptor { +public: + DictionaryTableDescriptor(const TTableDescriptor& tdesc); + std::string debug_string() const override; +}; + class SchemaTableDescriptor : public TableDescriptor { public: SchemaTableDescriptor(const TTableDescriptor& tdesc); diff --git a/fe/fe-core/src/main/java/org/apache/doris/dictionary/Dictionary.java b/fe/fe-core/src/main/java/org/apache/doris/dictionary/Dictionary.java index 1292dbdbf1ac9b5..ccf3b2bf77dc67c 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/dictionary/Dictionary.java +++ b/fe/fe-core/src/main/java/org/apache/doris/dictionary/Dictionary.java @@ -199,7 +199,7 @@ public LayoutType getLayout() { @Override public TTableDescriptor toThrift() { - TDictionaryTable tDictionaryTable = new TDictionaryTable(getName()); + TDictionaryTable tDictionaryTable = new TDictionaryTable(); // TODO: use this to replace TDictionarySink.name TTableDescriptor tTableDescriptor = new TTableDescriptor(id, TTableType.DICTIONARY_TABLE, fullSchema.size(), 0, getName(), dbName); diff --git a/gensrc/thrift/Descriptors.thrift b/gensrc/thrift/Descriptors.thrift index 286a526bb88bdee..814f4edeadd64a0 100644 --- a/gensrc/thrift/Descriptors.thrift +++ b/gensrc/thrift/Descriptors.thrift @@ -381,7 +381,6 @@ struct TLakeSoulTable { } struct TDictionaryTable { - 1: required string name } // "Union" of all table types.