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

    https://github.com/apache/spark/pull/22701#discussion_r224602234
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisSuite.scala
 ---
    @@ -351,8 +351,8 @@ class AnalysisSuite extends AnalysisTest with Matchers {
       test("SPARK-24891 Fix HandleNullInputsForUDF rule") {
         val a = testRelation.output(0)
         val func = (x: Int, y: Int) => x + y
    -    val udf1 = ScalaUDF(func, IntegerType, a :: a :: Nil)
    -    val udf2 = ScalaUDF(func, IntegerType, a :: udf1 :: Nil)
    +    val udf1 = ScalaUDF(func, IntegerType, a :: a :: Nil, nullableTypes = 
false :: false :: Nil)
    --- End diff --
    
    It's two separate issues.
    If `nullableTypes` is not added here, the `HandleNullInputsForUDF` will do 
nothing, which means null checks will be missed. So it is itself a problem, 
which can be potentially triggered by a user.
    As to test, if the rule is not doing anything, the "doing something 
infinitely" bug cannot be reproduced. But the infinite issue is one on a 
theoretical level and is quite unlikely to have any end-user impact, thanks to 
@rxin's fix for SPARK-24865.


---

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

Reply via email to