gaodayue commented on a change in pull request #2050: segment_v2: Support 
bitmap index build
URL: https://github.com/apache/incubator-doris/pull/2050#discussion_r341125252
 
 

 ##########
 File path: be/src/olap/rowset/segment_v2/encoding_info.cpp
 ##########
 @@ -81,10 +103,23 @@ struct TypeEncodingTraits<type, DICT_ENCODING> {
     }
 };
 
-template<FieldType Type, EncodingTypePB Encoding>
-struct EncodingTraits : TypeEncodingTraits<Type, Encoding> {
-    static const FieldType type = Type;
-    static const EncodingTypePB encoding = Encoding;
+template<FieldType type, typename CppType>
+struct TypeEncodingTraits<type, FOR_ENCODING, CppType,
 
 Review comment:
   You can, but the code would be more verbose then.
   
   Before
   ```c++
   template<FieldType type, typename CppType>
   struct TypeEncodingTraits<type, FOR_ENCODING, CppType,
                             typename 
std::enable_if<std::is_integral<CppType>::value>::type> {
   ```
   
   After
   ```c++
   template<FieldType type>
   struct TypeEncodingTraits<type, FOR_ENCODING, typename 
CppTypeTraits<type>::CppType,
                             typename std::enable_if<std::is_integral<typename 
CppTypeTraits<type>::CppType>::value>::type> {
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to