wangbo commented on a change in pull request #1816: v2 segment support string 
encode(#1766)
URL: https://github.com/apache/incubator-doris/pull/1816#discussion_r329349381
 
 

 ##########
 File path: be/src/olap/types.h
 ##########
 @@ -562,12 +572,19 @@ struct FieldTypeTraits<OLAP_FIELD_TYPE_CHAR> : public 
BaseFieldtypeTraits<OLAP_F
     }
     static void set_to_min(void* buf) {
         auto slice = reinterpret_cast<Slice*>(buf);
-        memset(slice->data, 0, slice->size);
+        slice->size = 0;
     }
     static uint32_t hash_code(const void* data, uint32_t seed) {
         auto slice = reinterpret_cast<const Slice*>(data);
         return HashUtil::hash(slice->data, slice->size, seed);
     }
+    static char* get_type_value_with_arena(Arena* arena) {
+        char* type_value = arena->Allocate(sizeof(Slice));
+        Slice* real_type_value = (Slice*)type_value;
 
 Review comment:
   👌

----------------------------------------------------------------
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