Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/23062#discussion_r234449241
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ObjectExpressionsSuite.scala
---
@@ -410,6 +410,16 @@ class ObjectExpressionsSuite extends SparkFunSuite
with ExpressionEvalHelper {
dataType = ObjectType(classOf[outerObj.Inner]),
outerPointer = Some(() => outerObj))
checkObjectExprEvaluation(newInst2, new outerObj.Inner(1))
+
+ // SPARK-8288 Test
+ import org.apache.spark.sql.catalyst.ScroogeLikeExample
+ val newInst3 = NewInstance(
+ cls = classOf[ScroogeLikeExample],
+ arguments = Literal(1) :: Nil,
+ propagateNull = false,
+ dataType = ObjectType(classOf[ScroogeLikeExample]),
+ outerPointer = Some(() => outerObj))
+ checkObjectExprEvaluation(newInst3, ScroogeLikeExample(1))
--- End diff --
Besides unit tests, can you also add the tests on encoding
`ScroogeLikeExample` in Dataset?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]