Class TextAggregatePushdownSupport
java.lang.Object
org.elasticsearch.xpack.esql.datasources.TextAggregatePushdownSupport
- All Implemented Interfaces:
AggregatePushdownSupport
Aggregate-pushdown opt-in for the line-oriented text-format readers (CSV / TSV / NDJSON).
Supports
COUNT(*), COUNT(<literal>), COUNT(<column>), MIN(<column>),
MAX(<column>) when the column's ESQL data type has byte-stable comparison semantics
matching ES|QL's runtime ordering.
MIN/MAX-eligible types: BOOLEAN, INTEGER, LONG, DOUBLE, DATETIME, DATE_NANOS, KEYWORD, TEXT, IP.
Other types (VERSION uses semver order — not byte-lex; UNSIGNED_LONG — signed-byte serialization
mismatches the logical unsigned ordering) are rejected here to keep correctness ahead of breadth.
Virtual columns (_file.*, synthetic engine metadata) are rejected because the per-column
statistics layer cannot answer about them — same gate Parquet uses.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xpack.esql.datasources.spi.AggregatePushdownSupport
AggregatePushdownSupport.Pushability -
Field Summary
Fields inherited from interface org.elasticsearch.xpack.esql.datasources.spi.AggregatePushdownSupport
UNSUPPORTED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanText formats harvest per-column stats partially (none / count / projected / all scopes), so a column missing from a split's stats means "not harvested," not "all-null." Returningfalsemakes the optimizer safe-missCOUNT(<unharvested-col>)rather than serving a wrong0under the footer-format implicit-nulls contract.canPushAggregates(List<Expression> aggregates, List<Expression> groupings)
-
Constructor Details
-
TextAggregatePushdownSupport
public TextAggregatePushdownSupport()
-
-
Method Details
-
canPushAggregates
public AggregatePushdownSupport.Pushability canPushAggregates(List<Expression> aggregates, List<Expression> groupings) - Specified by:
canPushAggregatesin interfaceAggregatePushdownSupport
-
appliesImplicitNullsForAbsentColumn
public boolean appliesImplicitNullsForAbsentColumn()Text formats harvest per-column stats partially (none / count / projected / all scopes), so a column missing from a split's stats means "not harvested," not "all-null." Returningfalsemakes the optimizer safe-missCOUNT(<unharvested-col>)rather than serving a wrong0under the footer-format implicit-nulls contract.- Specified by:
appliesImplicitNullsForAbsentColumnin interfaceAggregatePushdownSupport
-