eldenmoon commented on code in PR #43375:
URL: https://github.com/apache/doris/pull/43375#discussion_r1833984807


##########
be/src/olap/rowset/segment_v2/segment_writer.cpp:
##########
@@ -186,8 +186,9 @@ Status SegmentWriter::_create_column_writer(uint32_t cid, 
const TabletColumn& co
 
     // now we create zone map for key columns in AGG_KEYS or all column in 
UNIQUE_KEYS or DUP_KEYS
     // except for columns whose type don't support zone map.
-    opts.need_zone_map = column.is_key() || schema->keys_type() != 
KeysType::AGG_KEYS;
-    opts.need_bloom_filter = column.is_bf_column();
+    opts.need_zone_map = (column.is_key() || schema->keys_type() != 
KeysType::AGG_KEYS) &&
+                         !column.is_variant_type();
+    opts.need_bloom_filter = column.is_bf_column() && 
!column.is_variant_type();

Review Comment:
   why not set is_bf_column in inherit_column_attributes? is variant type 
special here?



##########
be/src/olap/rowset/segment_v2/segment_writer.cpp:
##########
@@ -186,8 +186,9 @@ Status SegmentWriter::_create_column_writer(uint32_t cid, 
const TabletColumn& co
 
     // now we create zone map for key columns in AGG_KEYS or all column in 
UNIQUE_KEYS or DUP_KEYS
     // except for columns whose type don't support zone map.
-    opts.need_zone_map = column.is_key() || schema->keys_type() != 
KeysType::AGG_KEYS;
-    opts.need_bloom_filter = column.is_bf_column();
+    opts.need_zone_map = (column.is_key() || schema->keys_type() != 
KeysType::AGG_KEYS) &&

Review Comment:
   what about other types like jsonb or array map? do they need_zone_map?why is 
variant special here



##########
be/src/olap/rowset/segment_v2/vertical_segment_writer.cpp:
##########
@@ -179,8 +179,9 @@ Status 
VerticalSegmentWriter::_create_column_writer(uint32_t cid, const TabletCo
 
     // now we create zone map for key columns in AGG_KEYS or all column in 
UNIQUE_KEYS or DUP_KEYS
     // except for columns whose type don't support zone map.
-    opts.need_zone_map = column.is_key() || tablet_schema->keys_type() != 
KeysType::AGG_KEYS;
-    opts.need_bloom_filter = column.is_bf_column();
+    opts.need_zone_map = (column.is_key() || tablet_schema->keys_type() != 
KeysType::AGG_KEYS) &&

Review Comment:
   ditto



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

Reply via email to