You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`CodeGeneratorWithInterpretedFallback` is an [abstraction](#contract) of [codegen object generators](#implementations) that can create objects for [codegen](#createCodeGeneratedObject) and [interpreted](#createInterpretedObject) evaluation paths.
5
+
# CodeGeneratorWithInterpretedFallback Generators
4
6
5
-
## Type Constructor
7
+
`CodeGeneratorWithInterpretedFallback` is an [abstraction](#contract) of [codegen object generators](#implementations) that can [create `OUT` objects](#createObject) for [codegen](#createCodeGeneratedObject) and [interpreted](#createInterpretedObject) evaluation paths.
6
8
7
9
`CodeGeneratorWithInterpretedFallback` is a Scala type constructor (_generic class_) with `IN` and `OUT` type aliases.
*`CodeGeneratorWithInterpretedFallback` is requested to [create an `OUT` object](#createObject) (after [createCodeGeneratedObject](#createCodeGeneratedObject) failed with a non-fatal exception)
58
+
29
59
## Implementations
30
60
31
-
*`MutableProjection`
61
+
*[MutableProjection](MutableProjection.md)
32
62
*[Predicate](Predicate.md)
33
63
*[RowOrdering](RowOrdering.md)
34
64
*`SafeProjection`
35
65
*[UnsafeProjection](UnsafeProjection.md)
36
66
37
-
## <spanid="createObject"> Creating Object
67
+
## Creating OUT Object { #createObject }
38
68
39
69
```scala
40
70
createObject(
@@ -49,10 +79,12 @@ In case of a non-fatal exception, `createObject` prints out the following WARN m
49
79
Expr codegen error and falling back to interpreter mode
50
80
```
51
81
82
+
---
83
+
52
84
`createObject` is used when:
53
85
54
-
*`MutableProjection` utility is used to create a `MutableProjection`
86
+
*`MutableProjection` utility is used to [create a MutableProjection](MutableProjection.md#create)
55
87
*`Predicate` utility is used to [create a BasePredicate](Predicate.md#create)
56
88
*`RowOrdering` utility is used to [create a BaseOrdering](RowOrdering.md#create)
57
89
*`SafeProjection` utility is used to create a `Projection`
58
-
*`UnsafeProjection` utility is used to [create a UnsafeProjection](UnsafeProjection.md#create)
90
+
*`UnsafeProjection` utility is used to [create an UnsafeProjection](UnsafeProjection.md#create)
Copy file name to clipboardExpand all lines: docs/expressions/UnsafeProjection.md
+24-18Lines changed: 24 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,16 @@
1
1
# UnsafeProjection
2
2
3
-
`UnsafeProjection` is an [extension](#contract) of the [Projection](Projection.md) abstraction for [expressions](#implementations)that [encode InternalRows to UnsafeRows](#apply).
3
+
`UnsafeProjection` is an [extension](#contract) of the [Projection](Projection.md) abstraction for [projection functions](#implementations)from [InternalRows to (produce) UnsafeRows](#apply).
`UnsafeProjection` is created for [code generated](#createCodeGeneratedObject) and [interpreted](#createInterpretedObject) code evaluation paths (using [UnsafeProjection](#CodeGeneratorWithInterpretedFallback) factory object).
10
+
9
11
## Contract
10
12
11
-
### <spanid="apply"> Encoding InternalRow as UnsafeRow
13
+
### Encoding InternalRow as UnsafeRow { #apply }
12
14
13
15
```scala
14
16
apply(
@@ -29,29 +31,33 @@ Encodes the given [InternalRow](../InternalRow.md) to an [UnsafeRow](../UnsafeRo
`createCodeGeneratedObject` is part of the [CodeGeneratorWithInterpretedFallback](CodeGeneratorWithInterpretedFallback.md#createCodeGeneratedObject) abstraction.
38
+
```scala
39
+
createCodeGeneratedObject(
40
+
in: Seq[Expression]): UnsafeProjection
41
+
```
40
42
41
-
`createCodeGeneratedObject`...FIXME
43
+
`createCodeGeneratedObject` is part of the [CodeGeneratorWithInterpretedFallback](CodeGeneratorWithInterpretedFallback.md#createCodeGeneratedObject) abstraction.
`createCodeGeneratedObject`[generates an UnsafeProjection](../whole-stage-code-generation/GenerateUnsafeProjection.md#generate) for the given [Expression](Expression.md)s (possibly with [Subexpression Elimination](../subexpression-elimination.md) based on [spark.sql.subexpressionElimination.enabled](../configuration-properties.md#spark.sql.subexpressionElimination.enabled) configuration property).
`createInterpretedObject` is part of the [CodeGeneratorWithInterpretedFallback](CodeGeneratorWithInterpretedFallback.md#createInterpretedObject) abstraction.
56
+
`createInterpretedObject` is part of the [CodeGeneratorWithInterpretedFallback](CodeGeneratorWithInterpretedFallback.md#createInterpretedObject) abstraction.
51
57
52
-
`createInterpretedObject`...FIXME
58
+
`createInterpretedObject` creates an `UnsafeProjection` for the given [Expression](Expression.md)s.
0 commit comments