csun5285 commented on code in PR #66472:
URL: https://github.com/apache/doris/pull/66472#discussion_r3764350735


##########
be/src/storage/segment/segment_iterator.cpp:
##########
@@ -380,26 +376,20 @@ std::unique_ptr<AdaptiveBlockSizePredictor> 
SegmentIterator::_make_block_size_pr
         return nullptr;
     }
 
-    // Collect per-column raw byte metadata from the segment footer for the 
columns
-    // this iterator will actually output (defined by _schema, which is built 
from
-    // _opts.return_columns).
+    // Collect per-column raw byte metadata from the segment footer for the 
visible Block
+    // columns. Delete-predicate suffix columns do not contribute to the 
output byte budget.
     uint32_t seg_rows = _segment->num_rows();
     uint64_t total_raw_bytes = 0;
     double metadata_hint_bytes_per_row = 0.0;
     if (seg_rows > 0) {
-        const auto& ts = _segment->tablet_schema();
-        if (ts) {
-            for (ColumnId cid : _schema->column_ids()) {
-                if (static_cast<size_t>(cid) < ts->num_columns()) {
-                    int32_t uid = ts->column(cid).unique_id();
-                    uint64_t raw_bytes = _segment->column_raw_data_bytes(uid);
-                    if (uid >= 0 && raw_bytes > 0) {
-                        total_raw_bytes += raw_bytes;
-                    }
-                }
+        for (size_t ordinal = 0; ordinal < _schema->num_block_columns(); 
++ordinal) {

Review Comment:
   delete 谓词的column 不返回到 block 中,就没加



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