Github user cloud-fan commented on the issue:
https://github.com/apache/spark/pull/21106
I think it's very hard to unify the entry point(input type) for all the
code generators. E.g. some use `Seq[Expression]` as input, some use
`Seq[DataType]`.
I'd like to make `CodegenObjectFactory` only define internal interfaces,
and each implementation defines its own public interface by its need. E.g.
```
object UnsafeProjectionCreator
extends CodegenObjectFactory[(Seq[Expression], Boolean),
UnsafeProjection] {
protected def createCodeGeneratedObject(
expressions: Seq[Expression],
subexpressionEliminationEnabled: Boolean) = ...
protected def createInterpretedObject(
expressions: Seq[Expression],
subexpressionEliminationEnabled: Boolean) = ...
def create(expressions: Seq[Expression]) = ...
def create(schema: StructType) = ...
}
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]