@Internal public class CastRulePredicate extends Object
CastRule, the runtime checks if a particular rule matches the tuple
of input and target type using this class. In particular, a rule is applied if:
getTargetTypeRoots() includes the LogicalTypeRoot of target type and
either
getInputTypeRoots() includes the LogicalTypeRoot of input type or
getInputTypeFamilies() includes one of the LogicalTypeFamily of
input type
getTargetTypeFamilies() includes one of the LogicalTypeFamily of target
type and either
getInputTypeRoots() includes the LogicalTypeRoot of input type or
getInputTypeFamilies() includes one of the LogicalTypeFamily of
input type
getCustomPredicate() is not null, the input LogicalType and target
LogicalType matches the predicate.
The customPredicate should be used in cases where LogicalTypeRoot and LogicalTypeFamily are not enough to identify whether a rule is applicable or not, for example
when the matching depends on a field of the provided input LogicalType instance.
| Modifier and Type | Class and Description |
|---|---|
static class |
CastRulePredicate.Builder
Builder for the
CastRulePredicate. |
| Modifier and Type | Method and Description |
|---|---|
static CastRulePredicate.Builder |
builder() |
Optional<java.util.function.BiPredicate<org.apache.flink.table.types.logical.LogicalType,org.apache.flink.table.types.logical.LogicalType>> |
getCustomPredicate() |
Set<org.apache.flink.table.types.logical.LogicalTypeFamily> |
getInputTypeFamilies() |
Set<org.apache.flink.table.types.logical.LogicalTypeRoot> |
getInputTypeRoots() |
Set<org.apache.flink.table.types.logical.LogicalTypeFamily> |
getTargetTypeFamilies() |
Set<org.apache.flink.table.types.logical.LogicalTypeRoot> |
getTargetTypeRoots() |
Set<org.apache.flink.table.types.logical.LogicalType> |
getTargetTypes() |
public Set<org.apache.flink.table.types.logical.LogicalType> getTargetTypes()
public Set<org.apache.flink.table.types.logical.LogicalTypeRoot> getInputTypeRoots()
public Set<org.apache.flink.table.types.logical.LogicalTypeRoot> getTargetTypeRoots()
public Set<org.apache.flink.table.types.logical.LogicalTypeFamily> getInputTypeFamilies()
public Set<org.apache.flink.table.types.logical.LogicalTypeFamily> getTargetTypeFamilies()
public Optional<java.util.function.BiPredicate<org.apache.flink.table.types.logical.LogicalType,org.apache.flink.table.types.logical.LogicalType>> getCustomPredicate()
public static CastRulePredicate.Builder builder()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.