Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/20756#discussion_r176956857
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ObjectExpressionsSuite.scala
---
@@ -68,6 +68,23 @@ class ObjectExpressionsSuite extends SparkFunSuite with
ExpressionEvalHelper {
mapEncoder.serializer.head, mapExpected, mapInputRow)
}
+ test("SPARK-23593: InitializeJavaBean should support interpreted
execution") {
+ val list = new java.util.LinkedList[Int]()
+ list.add(1)
+
+ val initializeBean = InitializeJavaBean(Literal.fromObject(new
java.util.LinkedList[Int]),
+ Map("add" -> Literal(1)))
+ checkEvaluation(initializeBean, list, InternalRow.fromSeq(Seq()))
+
+ val initializeWithNonexistingMethod = InitializeJavaBean(
+ Literal.fromObject(new java.util.LinkedList[Int]),
--- End diff --
Can you also add a test for when the parameter types do not match up?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]