IN
- Input internal typeOUT
- Output internal type@Internal public interface CastRule<IN,OUT>
CastRule
provides the logic to create a CastExecutor
starting from the input
and the target types. A rule is matched using CastRulePredicate
.Modifier and Type | Interface and Description |
---|---|
static interface |
CastRule.Context
Casting context.
|
Modifier and Type | Method and Description |
---|---|
default boolean |
canFail(LogicalType inputLogicalType,
LogicalType targetLogicalType)
Returns true if the
CastExecutor can fail at runtime. |
CastExecutor<IN,OUT> |
create(CastRule.Context context,
LogicalType inputLogicalType,
LogicalType targetLogicalType)
Create a
CastExecutor starting from the provided input type. |
CastRulePredicate |
getPredicateDefinition() |
CastRulePredicate getPredicateDefinition()
CastExecutor<IN,OUT> create(CastRule.Context context, LogicalType inputLogicalType, LogicalType targetLogicalType)
CastExecutor
starting from the provided input type. The returned CastExecutor
assumes the input value is using the internal data type, and it's a valid value
for the provided targetLogicalType
.default boolean canFail(LogicalType inputLogicalType, LogicalType targetLogicalType)
CastExecutor
can fail at runtime.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.