github-actions[bot] commented on code in PR #66849:
URL: https://github.com/apache/doris/pull/66849#discussion_r3796864537
##########
be/src/exec/scan/olap_scanner.cpp:
##########
@@ -496,16 +497,26 @@ Status OlapScanner::_init_tablet_reader_params(
add_return_column_if_absent(static_cast<uint32_t>(op_idx));
}
- for (auto cid : _return_columns) {
- if (cid >= tablet_schema->num_key_columns()) {
- const auto& col_name = tablet_schema->column(cid).name();
- std::string before_col_name;
- before_col_name.append("__BEFORE__");
- before_col_name.append(col_name);
- before_col_name.append("__");
- if (int32_t before_idx =
tablet_schema->field_index(before_col_name);
- before_idx >= 0) {
-
add_return_column_if_absent(static_cast<uint32_t>(before_idx));
+ if (is_min_delta_scan) {
+ // No-op UPDATE detection compares the complete row state at the
two ends of the
+ // window. Read every AFTER/BEFORE value column even when SQL
projects only a subset;
+ // BlockReader's return-column mapping keeps these comparison-only
columns hidden.
+ for (uint32_t cid = tablet_schema->num_key_columns();
Review Comment:
[P1] Preflight unsupported types before widening the projection. If any
value is BITMAP, HLL, QUANTILE_STATE, or another rejected shape, BlockReader
permanently sets comparison completeness to false, so this optimization can
never suppress a group. This loop nevertheless reads every unrequested AFTER
and BEFORE value on every block; even a key-only MIN_DELTA query on a BITMAP
table now pays the large extra I/O for no behavior change. When complete
comparison is statically impossible, preserve the old narrow projection (and
keep the runtime check conservative).
--
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]