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.
  • Field Details

  • 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 makes COUNT(col) = rowCount - columnNullCount correct 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 — a count-scope scan harvests no columns, a projected-scope scan only the query's projected ones — so an absent column key means "not harvested," NOT "all-null." Those formats override this to false so the optimizer safe-misses COUNT(col) for an unharvested column (re-scan) instead of serving a wrong 0.