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_r328439160
 
 

 ##########
 File path: be/src/olap/rowset/segment_v2/column_zone_map.cpp
 ##########
 @@ -82,6 +82,8 @@ void ColumnZoneMapBuilder::_reset_zone_map() {
     Slice *min_slice = (Slice *)_zone_map.min_value;
     min_slice->data = _max_string_value;
     min_slice->size = OLAP_STRING_MAX_LENGTH;
+    Slice *max_slice = (Slice *)_zone_map.max_value;
+    max_slice->size = 0;
 
 Review comment:
   1. the char array allocated to min_value and max_value must be 
initialed(like set to 0),otherwise when casting array to slice ,the size 
property of slice may be very huge
   2. I think do the init in column_zone_map is better,because column_zone_map 
contains the context(like _max_string_value,arena),only do init when type=char

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