Class PushdownPredicates
java.lang.Object
org.elasticsearch.xpack.esql.datasources.pushdown.PushdownPredicates
Shared structural validation for predicate pushdown across file formats (ORC, Parquet, etc.).
These methods check whether an ESQL expression has the right structure for pushdown:
field reference on the left, foldable literal on the right, supported operator, and
a data type the target format can handle. The format-specific type check is provided
as a Predicate<DataType> so each format plugs in its own supported types.
Boolean connective rules (AND partial vs full pushdown, OR, NOT) are intentionally excluded — ORC allows partial AND pushdown while Iceberg requires both sides, so the traversal logic stays format-specific.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisComparison(EsqlBinaryComparison bc, Predicate<DataType> typeSupported) Checks if a binary comparison can be pushed down: left side is a field reference, right side is a foldable literal, operator is one of the six standard comparisons, and the field's data type is supported by the target format.static booleanChecks if an IN expression can be pushed down: value is a field reference with a supported data type, all list items are foldable, and at least one is non-null.static booleanisIsNotNull(IsNotNull isNotNull, Predicate<DataType> typeSupported) Checks if an IS NOT NULL expression can be pushed down: field is a named expression with a supported data type.static booleanChecks if an IS NULL expression can be pushed down: field is a named expression with a supported data type.static booleanChecks if a range expression can be pushed down: value is a field reference with a supported data type, and both bounds are foldable.static booleanisStartsWith(StartsWith sw, Predicate<DataType> typeSupported) Checks if a StartsWith expression can be pushed down: field is a single-value named expression with a supported data type, and the prefix is foldable.
-
Method Details
-
isComparison
Checks if a binary comparison can be pushed down: left side is a field reference, right side is a foldable literal, operator is one of the six standard comparisons, and the field's data type is supported by the target format. -
isIn
Checks if an IN expression can be pushed down: value is a field reference with a supported data type, all list items are foldable, and at least one is non-null. -
isIsNull
Checks if an IS NULL expression can be pushed down: field is a named expression with a supported data type. -
isIsNotNull
Checks if an IS NOT NULL expression can be pushed down: field is a named expression with a supported data type. -
isRange
Checks if a range expression can be pushed down: value is a field reference with a supported data type, and both bounds are foldable. -
isStartsWith
Checks if a StartsWith expression can be pushed down: field is a single-value named expression with a supported data type, and the prefix is foldable.
-