cloud-fan commented on code in PR #38489:
URL: https://github.com/apache/spark/pull/38489#discussion_r1032059432
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/metric/SQLMetricsSuite.scala:
##########
@@ -842,6 +842,29 @@ class SQLMetricsSuite extends SharedSparkSession with
SQLMetricsTestUtils
assert(createTableAsSelect.metrics("numOutputRows").value == 1)
}
}
+
+ test("SPARK-41003: BHJ LeftAnti does not update numOutputRows when codegen
is disabled") {
+ Seq(true, false).foreach(enableWholeStage => {
+ withSQLConf(SQLConf.WHOLESTAGE_CODEGEN_ENABLED.key ->
enableWholeStage.toString) {
+ withSQLConf(SQLConf.OPTIMIZE_NULL_AWARE_ANTI_JOIN.key -> "true") {
+ withTable("t1", "t2") {
+ spark.range(4).write.saveAsTable("t1")
+ spark.range(2).write.saveAsTable("t2")
+ val df = sql("SELECT * FROM t1 WHERE id NOT IN (SELECT id FROM
t2)")
+ df.collect()
+ val plan = df.queryExecution.executedPlan
+
+ val exchanges = plan.collect {
Review Comment:
exchanges -> joins?
--
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]