Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/20751#discussion_r172580937
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
---
@@ -1154,8 +1154,18 @@ case class CreateExternalRow(children:
Seq[Expression], schema: StructType)
case class EncodeUsingSerializer(child: Expression, kryo: Boolean)
extends UnaryExpression with NonSQLExpression {
- override def eval(input: InternalRow): Any =
- throw new UnsupportedOperationException("Only code-generated
evaluation is supported")
+ override def eval(input: InternalRow): Any = {
+ val obj = child.eval(input)
+ if (obj == null) return null
+
+ val conf = Option(SparkEnv.get).map(_.conf).getOrElse(new SparkConf)
+ val serializer = if (kryo) {
--- End diff --
No problem :)
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]