xy720 commented on code in PR #16444:
URL: https://github.com/apache/doris/pull/16444#discussion_r1099771600


##########
be/src/runtime/types.cpp:
##########
@@ -78,15 +93,17 @@ TypeDescriptor::TypeDescriptor(const 
std::vector<TTypeNode>& types, int* idx)
     //     ++(*idx);
     //     children.push_back(TypeDescriptor(types, idx));
     //     break;
-    // case TTypeNodeType::MAP:
-    //     DCHECK(!node.__isset.scalar_type);
-    //     DCHECK_LT(*idx, types.size() - 2);
-    //     type = TYPE_MAP;
-    //     ++(*idx);
-    //     children.push_back(TypeDescriptor(types, idx));
-    //     ++(*idx);
-    //     children.push_back(TypeDescriptor(types, idx));
-    //     break;
+    case TTypeNodeType::MAP: {
+        DCHECK(!node.__isset.scalar_type);
+        DCHECK_LT(*idx, types.size() - 2);
+        DCHECK(!node.__isset.contains_null);

Review Comment:
   Added a todo comment here



##########
be/src/olap/tablet_meta.cpp:
##########
@@ -297,11 +297,21 @@ void TabletMeta::init_column_from_tcolumn(uint32_t 
unique_id, const TColumn& tco
     if (tcolumn.__isset.is_bloom_filter_column) {
         column->set_is_bf_column(tcolumn.is_bloom_filter_column);
     }
-
-    if (tcolumn.column_type.type == TPrimitiveType::ARRAY) {
+    if (tcolumn.column_type.type == TPrimitiveType::STRUCT) {
+        for (size_t i = 0; i < tcolumn.children_column.size(); i++) {
+            ColumnPB* children_column = column->add_children_columns();
+            init_column_from_tcolumn(i, tcolumn.children_column[i], 
children_column);
+        }
+    } else if (tcolumn.column_type.type == TPrimitiveType::ARRAY) {
         ColumnPB* children_column = column->add_children_columns();
         init_column_from_tcolumn(0, tcolumn.children_column[0], 
children_column);
     }
+    if (tcolumn.column_type.type == TPrimitiveType::MAP) {

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to