Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/20980#discussion_r183036460
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ObjectExpressionsSuite.scala
---
@@ -472,6 +474,61 @@ class ObjectExpressionsSuite extends SparkFunSuite
with ExpressionEvalHelper {
val deserializer = toMapExpr.copy(inputData = Literal.create(data))
checkObjectExprEvaluation(deserializer, expected = data)
}
+
+ private def javaSerializerFor(beanClass: Class[_])(inputObject:
Expression): CreateNamedStruct = {
+ JavaTypeInference.serializerFor(inputObject, TypeToken.of(beanClass))
match {
+ case e => CreateNamedStruct(Literal("value") :: e :: Nil)
+ }
+ }
+
+ test("SPARK-23589 ExternalMapToCatalyst should support interpreted
execution") {
--- End diff --
One more thing, can you please directly add `ExternalMapToCatalyst`
expressions here. Using `javaSerializerFor` for this is pretty confusing and
might cause us to test a different code path at some point.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]