github-actions[bot] commented on code in PR #65548:
URL: https://github.com/apache/doris/pull/65548#discussion_r3604598619
##########
be/src/format_v2/table_reader.cpp:
##########
@@ -875,12 +877,18 @@ Status TableReader::prepare_split(const SplitReadOptions&
options) {
// active and no predicate can arrive later. The metadata path can return
several batches for
// one split; after its first synthetic batch there is no way to recover
the real rows if a
// runtime filter arrives before the next scheduler turn.
- if (_push_down_agg_type == TPushAggOp::type::COUNT &&
options.all_runtime_filters_applied &&
+ // Table-level metadata only contains the number of rows; it cannot
evaluate an expression or
+ // the NULL state of a COUNT argument. Require the new FE's explicit empty
argument list, which
+ // means COUNT(*)/COUNT(1). A non-empty list means COUNT(col), while
nullopt comes from an old FE
+ // whose COUNT semantics are unknown during a BE-first rolling upgrade.
+ if (_push_down_agg_type == TPushAggOp::type::COUNT &&
_push_down_count_columns.has_value() &&
Review Comment:
[P1] Do not row-fallback after an old FE already reduced COUNT splits
During the supported BE-first upgrade, an old FE cannot send field 55, but
its Iceberg/Paimon planner has already used the raw COUNT opcode to keep only
representative splits and attach `table_level_row_count`. This `has_value()`
gate makes the new BE ignore that count and scan the received ranges, so an old
FE can send one Iceberg task for `COUNT(*)` over 100 files and the new BE
returns only that task's rows. V1 has the same outcome through
`_effective_push_down_agg_type() == NONE`. Please preserve or explicitly reject
pre-reduced old-FE plans, or add a compatibility signal; absent semantics
cannot safely trigger a normal row scan after FE split loss.
--
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]