csun5285 commented on code in PR #63153:
URL: https://github.com/apache/doris/pull/63153#discussion_r3224255056
##########
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:
测试代码里面的typeinfo 的函数已经被删掉,不会出现编译错误。
--
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]