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



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/WholeStageCodegenSuite.scala
##########
@@ -143,9 +143,10 @@ class WholeStageCodegenSuite extends QueryTest with 
SharedSparkSession
     val schema = new StructType().add("k", IntegerType).add("v", StringType)
     val smallDF = spark.createDataFrame(rdd, schema)
     val df = spark.range(10).join(broadcast(smallDF), col("k") === col("id"))
-    assert(df.queryExecution.executedPlan.find(p =>
-      p.isInstanceOf[WholeStageCodegenExec] &&
-        
p.asInstanceOf[WholeStageCodegenExec].child.isInstanceOf[BroadcastHashJoinExec]).isDefined)
+    val broadcastHashJoin = df.queryExecution.executedPlan.find {
+      case WholeStageCodegenExec(ProjectExec(_, _: BroadcastHashJoinExec)) => 
true

Review comment:
       There is a `cast`.
   ```
   == Optimized Logical Plan ==
   Project [id#6L, k#2, v#3]
   +- Join Inner, (id#6L = CAST(k AS BIGINT)#14L), 
rightHint=(strategy=broadcast)
      :- Range (0, 10, step=1, splits=Some(2))
      +- Project [k#2, v#3, cast(k#2 as bigint) AS CAST(k AS BIGINT)#14L]
         +- Filter isnotnull(cast(k#2 as bigint))
            +- LogicalRDD [k#2, v#3], false
   ```




-- 
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