wangyum commented on a change in pull request #33522:
URL: https://github.com/apache/spark/pull/33522#discussion_r743690305



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/JoinSuite.scala
##########
@@ -1057,7 +1057,7 @@ class JoinSuite extends QueryTest with SharedSparkSession 
with AdaptiveSparkPlan
     val pythonEvals = collect(joinNode.get) {
       case p: BatchEvalPythonExec => p
     }
-    assert(pythonEvals.size == 2)
+    assert(pythonEvals.size == 4)

Review comment:
       Yes. If we disable `spark.sql.constraintPropagation.enabled`, the plan 
is:
   ```
   == Optimized Logical Plan ==
   Project [a#225, b#226, c#236, d#237]
   +- Join Inner, (CAST(udf(cast(a as string)) AS INT)#250 = CAST(udf(cast(c as 
string)) AS INT)#251)
      :- Project [_1#220 AS a#225, _2#221 AS b#226, cast(pythonUDF0#252 as int) 
AS CAST(udf(cast(a as string)) AS INT)#250]
      :  +- BatchEvalPython [udf(cast(_1#220 as string))], [pythonUDF0#252]
      :     +- LocalRelation [_1#220, _2#221]
      +- Project [_1#231 AS c#236, _2#232 AS d#237, cast(pythonUDF0#253 as int) 
AS CAST(udf(cast(c as string)) AS INT)#251]
         +- BatchEvalPython [udf(cast(_1#231 as string))], [pythonUDF0#253]
            +- LocalRelation [_1#231, _2#232]
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to