github-actions[bot] commented on code in PR #15966: URL: https://github.com/apache/doris/pull/15966#discussion_r1094185768
########## be/src/vec/data_types/data_type_factory.cpp: ########## @@ -169,7 +179,12 @@ } nested = std::make_shared<DataTypeStruct>(dataTypes, names); break; - } + case TYPE_MAP: + DCHECK(col_desc.children.size() == 2); + nested = std::make_shared<vectorized::DataTypeMap>( + create_data_type(col_desc.children[0], col_desc.contains_nulls[0]), + create_data_type(col_desc.children[1], col_desc.contains_nulls[1])); + break; case INVALID_TYPE: default: Review Comment: warning: cannot jump from switch statement to this case label [clang-diagnostic-error] ```cpp default: ^ ``` **be/src/vec/data_types/data_type_factory.cpp:172:** jump bypasses variable initialization ```cpp Strings names; ^ ``` **be/src/vec/data_types/data_type_factory.cpp:171:** jump bypasses variable initialization ```cpp DataTypes dataTypes; ^ ``` **be/src/vec/data_types/data_type_factory.cpp:169:** jump bypasses variable initialization ```cpp size_t child_size = col_desc.children.size(); ^ ``` ########## be/src/vec/data_types/data_type_factory.cpp: ########## @@ -169,7 +179,12 @@ DataTypePtr DataTypeFactory::create_data_type(const TypeDescriptor& col_desc, bo } nested = std::make_shared<DataTypeStruct>(dataTypes, names); break; - } + case TYPE_MAP: + DCHECK(col_desc.children.size() == 2); + nested = std::make_shared<vectorized::DataTypeMap>( + create_data_type(col_desc.children[0], col_desc.contains_nulls[0]), + create_data_type(col_desc.children[1], col_desc.contains_nulls[1])); + break; case INVALID_TYPE: Review Comment: warning: cannot jump from switch statement to this case label [clang-diagnostic-error] ```cpp case INVALID_TYPE: ^ ``` **be/src/vec/data_types/data_type_factory.cpp:172:** jump bypasses variable initialization ```cpp Strings names; ^ ``` **be/src/vec/data_types/data_type_factory.cpp:171:** jump bypasses variable initialization ```cpp DataTypes dataTypes; ^ ``` **be/src/vec/data_types/data_type_factory.cpp:169:** jump bypasses variable initialization ```cpp size_t child_size = col_desc.children.size(); ^ ``` -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org