zbtzbtzbt commented on a change in pull request #8500:
URL: https://github.com/apache/incubator-doris/pull/8500#discussion_r829675327
##########
File path: be/src/olap/types.cpp
##########
@@ -85,7 +82,11 @@ ScalarTypeInfoResolver::ScalarTypeInfoResolver() {
add_mapping<OLAP_FIELD_TYPE_OBJECT>();
}
-ScalarTypeInfoResolver::~ScalarTypeInfoResolver() {}
+ScalarTypeInfoResolver::~ScalarTypeInfoResolver() {
Review comment:
ok
##########
File path: be/src/olap/types.cpp
##########
@@ -44,27 +44,24 @@ class ScalarTypeInfoResolver {
DECLARE_SINGLETON(ScalarTypeInfoResolver);
public:
- std::shared_ptr<const TypeInfo> get_type_info(const FieldType t) {
- auto pair = _scalar_type_mapping.find(t);
- DCHECK(pair != _scalar_type_mapping.end()) << "Bad field type: " << t;
- return pair->second;
+ std::shared_ptr<const TypeInfo> get_type_info(const FieldType t) const {
+ return _scalar_type_mapping[t];
Review comment:
Sounds like it can be returned at compile time?
##########
File path: be/src/olap/olap_common.h
##########
@@ -143,7 +142,8 @@ enum FieldType {
OLAP_FIELD_TYPE_HLL = 23,
OLAP_FIELD_TYPE_BOOL = 24,
OLAP_FIELD_TYPE_OBJECT = 25,
- OLAP_FIELD_TYPE_STRING = 26
+ OLAP_FIELD_TYPE_STRING = 26,
+ OLAP_FIELD_TYPE_SIZE = 27 // Size of FieldType, Notice: This must be the
last field of FieldType
Review comment:
ok,i try to delete this ugly param
--
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]