CodeGeneratorWithInterpretedFallback Generators¶
CodeGeneratorWithInterpretedFallback is an abstraction of codegen object generators that can create OUT objects for codegen and interpreted evaluation paths.
CodeGeneratorWithInterpretedFallback is a Scala type constructor (generic class) with IN and OUT type aliases.
CodeGeneratorWithInterpretedFallback[IN, OUT]
| CodeGeneratorWithInterpretedFallback | IN | OUT |
|---|---|---|
| RowOrdering | SortOrders (Seq[SortOrder]) | BaseOrdering |
| Predicate | Expression | BasePredicate |
| MutableProjection | Expressions (Seq[Expression]) | MutableProjection |
| UnsafeProjection | Expressions (Seq[Expression]) | UnsafeProjection |
SafeProjection | Expressions (Seq[Expression]) | Projection |
Contract¶
createCodeGeneratedObject¶
createCodeGeneratedObject(
in: IN): OUT
See:
Used when:
CodeGeneratorWithInterpretedFallbackis requested to create anOUTobject
createInterpretedObject¶
createInterpretedObject(
in: IN): OUT
See:
Used when:
CodeGeneratorWithInterpretedFallbackis requested to create anOUTobject (after createCodeGeneratedObject failed with a non-fatal exception)
Implementations¶
- MutableProjection
- Predicate
- RowOrdering
SafeProjection- UnsafeProjection
Creating OUT Object¶
createObject(
in: IN): OUT
createObject createCodeGeneratedObject.
In case of a non-fatal exception, createObject prints out the following WARN message to the logs and createInterpretedObject.
Expr codegen error and falling back to interpreter mode
createObject is used when:
MutableProjectionutility is used to create a MutableProjectionPredicateutility is used to create a BasePredicateRowOrderingutility is used to create a BaseOrderingSafeProjectionutility is used to create aProjectionUnsafeProjectionutility is used to create an UnsafeProjection