yiguolei commented on code in PR #62544:
URL: https://github.com/apache/doris/pull/62544#discussion_r3174018676


##########
be/src/storage/index/zone_map/zone_map_index.cpp:
##########
@@ -195,14 +225,20 @@ void 
TypedZoneMapIndexWriter<Type>::invalid_page_zone_map() {
 
 template <PrimitiveType Type>
 Status TypedZoneMapIndexWriter<Type>::flush() {
+    // Materialize the running CppType min/max into the Field-typed page zone 
map
+    // before merging into the segment zone map / serializing to proto.
+    _materialize_page_minmax();
+
     // Update segment zone map.
-    if (!_segment_zone_map.has_not_null ||
-        _segment_zone_map.min_value.get<Type>() > 
_page_zone_map.min_value.get<Type>()) {

Review Comment:
   我怎么感觉之前的逻辑是错的。。。
   假如当前要flush的page zonemap has not null = = false,此时page zonemap 的min和max 
是没意义的,但是min 的那个默认值,可能会比segment zonemap的min 要小,就会去设置一下,结果导致segment zonemap的min 
偏小了



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