public class PredicateConverter extends Object implements org.apache.flink.table.expressions.ExpressionVisitor<Predicate>
Expression
to Predicate
.
For FieldReferenceExpression
, please use name instead of index, if the project
pushdown is before and the filter pushdown is after, the index of the filter will be projected.
Modifier and Type | Class and Description |
---|---|
static class |
PredicateConverter.UnsupportedExpression
Encounter an unsupported expression, the caller can choose to ignore this filter branch.
|
Constructor and Description |
---|
PredicateConverter(PredicateBuilder builder) |
PredicateConverter(org.apache.flink.table.types.logical.RowType type) |
Modifier and Type | Method and Description |
---|---|
static Optional<Predicate> |
convert(org.apache.flink.table.types.logical.RowType rowType,
org.apache.flink.table.expressions.ResolvedExpression filter)
Try best to convert a
ResolvedExpression to Predicate . |
Predicate |
visit(org.apache.flink.table.expressions.CallExpression call) |
Predicate |
visit(org.apache.flink.table.expressions.Expression expression) |
Predicate |
visit(org.apache.flink.table.expressions.FieldReferenceExpression fieldReferenceExpression) |
Predicate |
visit(org.apache.flink.table.expressions.TypeLiteralExpression typeLiteralExpression) |
Predicate |
visit(org.apache.flink.table.expressions.ValueLiteralExpression valueLiteralExpression) |
public PredicateConverter(org.apache.flink.table.types.logical.RowType type)
public PredicateConverter(PredicateBuilder builder)
public Predicate visit(org.apache.flink.table.expressions.CallExpression call)
visit
in interface org.apache.flink.table.expressions.ExpressionVisitor<Predicate>
public Predicate visit(org.apache.flink.table.expressions.ValueLiteralExpression valueLiteralExpression)
visit
in interface org.apache.flink.table.expressions.ExpressionVisitor<Predicate>
public Predicate visit(org.apache.flink.table.expressions.FieldReferenceExpression fieldReferenceExpression)
visit
in interface org.apache.flink.table.expressions.ExpressionVisitor<Predicate>
public Predicate visit(org.apache.flink.table.expressions.TypeLiteralExpression typeLiteralExpression)
visit
in interface org.apache.flink.table.expressions.ExpressionVisitor<Predicate>
public Predicate visit(org.apache.flink.table.expressions.Expression expression)
visit
in interface org.apache.flink.table.expressions.ExpressionVisitor<Predicate>
public static Optional<Predicate> convert(org.apache.flink.table.types.logical.RowType rowType, org.apache.flink.table.expressions.ResolvedExpression filter)
ResolvedExpression
to Predicate
.filter
- a resolved expressionPredicate
if no PredicateConverter.UnsupportedExpression
thrown.Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.