Interface AggregatePushdownSupport
- All Known Implementing Classes:
TextAggregatePushdownSupport
public interface AggregatePushdownSupport
SPI for declaring that a format can compute aggregates from file-level statistics.
Implementations are queried by the optimizer to determine if aggregates can be
pushed down. The actual computation happens via file footer reads at execution time.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanWhether a column that is absent from a split's per-column statistics can be treated as all-null — the "implicit nulls" contract that makesCOUNT(col) = rowCount - columnNullCountcorrect without a "column present?" probe.canPushAggregates(List<Expression> aggregates, List<Expression> groupings)
-
Field Details
-
UNSUPPORTED
-
-
Method Details
-
canPushAggregates
AggregatePushdownSupport.Pushability canPushAggregates(List<Expression> aggregates, List<Expression> groupings) -
appliesImplicitNullsForAbsentColumn
default boolean appliesImplicitNullsForAbsentColumn()Whether a column that is absent from a split's per-column statistics can be treated as all-null — the "implicit nulls" contract that makesCOUNT(col) = rowCount - columnNullCountcorrect without a "column present?" probe.Footer formats (Parquet, ORC) emit one column-family stat for every column they physically contain, so an absent column genuinely means all-null and this returns
true(the default). Line-oriented text formats (CSV / TSV / NDJSON) harvest per-column stats partially — acount-scope scan harvests no columns, aprojected-scope scan only the query's projected ones — so an absent column key means "not harvested," NOT "all-null." Those formats override this tofalseso the optimizer safe-missesCOUNT(col)for an unharvested column (re-scan) instead of serving a wrong0.
-