github-actions[bot] commented on code in PR #63153:
URL: https://github.com/apache/doris/pull/63153#discussion_r3223781156
##########
be/src/storage/types.h:
##########
@@ -595,24 +372,51 @@ struct TypeTraits : public FieldTypeTraits<field_type> {
static const int32_t size = sizeof(CppType);
};
-template <FieldType field_type>
-const TypeInfo* get_scalar_type_info() {
- static constexpr TypeTraits<field_type> traits;
- static ScalarTypeInfo scalar_type_info(traits);
- return &scalar_type_info;
-}
-
-template <FieldType field_type>
-inline const TypeInfo* get_collection_type_info() {
- static ArrayTypeInfo collection_type_info(
- create_static_type_info_ptr(get_scalar_type_info<field_type>()));
- return &collection_type_info;
-}
-
-// nested array type is unsupported for sub_type of collection
-template <>
-inline const TypeInfo*
get_collection_type_info<FieldType::OLAP_FIELD_TYPE_ARRAY>() {
- return nullptr;
+inline size_t field_type_size(FieldType field_type) {
+ switch (field_type) {
Review Comment:
Removing the `TypeInfo` helpers here leaves several BE tests uncompilable. A
repo-wide search of the PR head still finds calls such as
`get_scalar_type_info(...)`, `get_type_info(&meta)`, and
`create_static_type_info_ptr(...)` in
`be/test/storage/segment/rle_page_test.cpp`, `plain_page_test.cpp`,
`binary_prefix_page_test.cpp`, `binary_plain_page_test.cpp`,
`frame_of_reference_page_test.cpp`, `bitshuffle_page_test.cpp`, and
`column_reader_writer_test.cpp`. Since this header no longer declares those
symbols and there is no remaining `TypeInfo` definition under `be/src`, those
test targets will fail at compile time. Please migrate the remaining tests (or
keep a compatible helper API) as part of this refactor.
--
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]