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

    https://github.com/apache/spark/pull/20756#discussion_r172837282
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelper.scala
 ---
    @@ -49,7 +49,8 @@ trait ExpressionEvalHelper extends 
GeneratorDrivenPropertyChecks {
           expression: => Expression, expected: Any, inputRow: InternalRow = 
EmptyRow): Unit = {
         val serializer = new JavaSerializer(new SparkConf()).newInstance
         val resolver = ResolveTimeZone(new SQLConf)
    -    val expr = 
resolver.resolveTimeZones(serializer.deserialize(serializer.serialize(expression)))
    +    // Make it as method to obtain fresh expression everytime.
    --- End diff --
    
    The content of bean instance will be changed after first evaluation of 
interpreted execution. For example, in the added unit test, the input bean of 
the later evaluation will become `[1]` not `[]`. So the later evaluation result 
will be `[1, 1]`.


---

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

Reply via email to