github-actions[bot] commented on code in PR #65498:
URL: https://github.com/apache/doris/pull/65498#discussion_r3565876758


##########
be/src/format_v2/table_reader.cpp:
##########
@@ -750,6 +750,9 @@ std::unique_ptr<io::FileDescription> 
create_file_description(const TFileRangeDes
 Status TableReader::prepare_split(const SplitReadOptions& options) {
     SCOPED_TIMER(_profile.prepare_split_timer);
     _current_split_pruned = false;
+    if (options.conjuncts.has_value()) {

Review Comment:
   This fresh split snapshot can still be bypassed by the table-level COUNT 
shortcut below. If a scan starts with no conjuncts, gets `TPushAggOp::COUNT` 
plus `table_level_row_count`, and then receives a late runtime filter before a 
later split, `_conjuncts` is replaced here but `prepare_split()` still sets 
`_remaining_table_level_count` and returns before any reader is opened. 
`get_block()` then emits synthetic rows from `_read_table_level_count()` 
without reaching `_build_table_filters_from_conjuncts()`, 
`_supports_aggregate_pushdown()`'s `!_table_filters.empty()` fallback, or 
row-level filter evaluation. That can make `COUNT(*)` ignore the late RF for 
these splits. Please disable the table-level row-count shortcut whenever the 
refreshed split conjunct snapshot is non-empty, or evaluate/build the filters 
before accepting the shortcut, and add a test for `SplitReadOptions::conjuncts` 
together with `table_level_row_count`.



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