github-actions[bot] commented on code in PR #65548:
URL: https://github.com/apache/doris/pull/65548#discussion_r3587923134
##########
be/src/format_v2/table_reader.h:
##########
@@ -449,6 +453,16 @@ class TableReader {
VLOG_DEBUG << "TableReader debug: " << debug_string();
}
RETURN_IF_ERROR(_open_mapping_exprs());
+ // COUNT(*) has no semantic column argument, but Nereids retains one
minimum-width scan
+ // slot so the scan node still has an output tuple. For example, in a
Parquet file whose
+ // first and only column is unsupported TIME_MILLIS, validating that
arbitrary placeholder
+ // would fail before the empty aggregate request can count rows from
footer metadata. Mark
+ // placeholders only after the same safety gate used by aggregate
materialization succeeds;
+ // COUNT(col), filters, deletes and pending runtime filters keep
normal column validation.
+ file_request->non_predicate_columns_are_count_star_placeholders =
Review Comment:
This still leaves a COUNT(*) fallback path observing the arbitrary
placeholder column. The marker is set only when
`_supports_aggregate_pushdown(COUNT)` is true, but that returns false as soon
as position deletes, deletion vectors, or Iceberg equality deletes are present.
When table-level row count is not assigned, `get_block()` then falls through to
the normal file-reader path; Parquet validates and later reads every
non-predicate column because the marker is false, while delete filtering only
needs the virtual row-position predicate column. So an Iceberg split whose
retained COUNT(*) placeholder is an unsupported `TIME_MILLIS` leaf can reject
`COUNT(*)` even though the value is never part of the aggregate. Please carry
the explicit COUNT(*) placeholder state into the delete-filter fallback path
and use a row-position/default-row carrier, or otherwise avoid
validating/reading the placeholder while still validating real predicate/delete
columns.
--
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]