Github user drewrobb commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23062#discussion_r234828613
  
    --- 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 --
    
    Thanks, that is a great tip-- I was looking for the place to place tests 
like this. Upon starting to add them I uncovered a few more code paths that my 
ScroogeExample didn't work with (because the trait was missing methods that 
actual scrooge code had to access member elements), so I fixed that also.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to