Copilot commented on code in PR #64305:
URL: https://github.com/apache/doris/pull/64305#discussion_r3379749697


##########
be/src/olap/rowset/rowset_meta.h:
##########
@@ -355,6 +355,17 @@ class RowsetMeta : public MetadataAdder<RowsetMeta> {
         _rowset_meta_pb.set_segments_key_bounds_truncated(truncated);
     }
 
+    // When true, `segments_key_bounds` holds a single aggregated
+    // [rowset_min, rowset_max] entry instead of per-segment bounds.
+    bool is_segments_key_bounds_aggregated() const {
+        return _rowset_meta_pb.has_segments_key_bounds_aggregated() &&
+               _rowset_meta_pb.segments_key_bounds_aggregated();
+    }
+
+    void set_segments_key_bounds_aggregated(bool aggregated) {
+        _rowset_meta_pb.set_segments_key_bounds_aggregated(aggregated);
+    }

Review Comment:
   `segments_key_bounds_aggregated` is an optional proto field intended to 
reduce meta size, but `set_segments_key_bounds_aggregated(false)` currently 
*sets* the field to `false` (making `has_segments_key_bounds_aggregated()` 
true). Since `set_segments_key_bounds()` calls this on every rowset build, this 
will serialize the new field for all non-aggregated rowsets too, increasing 
meta size and defeating the purpose of using `has_*` checks in cloud pb 
conversion.



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