You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "MaxGekk (via GitHub)" <gi...@apache.org> on 2026/09/25 08:30:37 UTC

[PR] [SPARK-59765][SQL][TESTS][4.x] Generate broadcast joins in full when measuring benchmark query codegen [spark]

MaxGekk opened a new pull request, #59039:
URL: https://github.com/apache/spark/pull/59039

   ### What changes were proposed in this pull request?
   
   This is a backport of #59018 to `branch-4.x`.
   
   `BenchmarkQueryTest.checkGeneratedCode` and `WholeStageCodegenSizeBenchmark` generate the code of the TPC-DS, TPC-H and SSB queries over empty tables. Over an empty table, a broadcast hash join generates a one-line stub instead of the join, so both measured stubs for every stage with a broadcast join. With #59018, each stage's code is generated from a copy of the stage whose broadcast exchanges read one row of default values, so the joins generate the code they generate for data.
   
   The code is the master commit's (3fa48313900) unchanged. Only the benchmark results differ:
   - The master commit also edits `WholeStageCodegenSizeBenchmark-jdk21-results.txt` and `-jdk25-results.txt`, which exist only on master (SPARK-58415). They are left out here.
   - `WholeStageCodegenSizeBenchmark-results.txt` is regenerated on `branch-4.x` with JDK 17, since its numbers differ from master's. As on master, the stage count is unchanged at 2247. The source code size grows from 21.85M to 25.42M characters, and the summed per-stage largest method from 841185 to 910183 bytes.
   
   ### Why are the changes needed?
   
   The same reason as #59018: the codegen size checks and the size benchmark measured stubs rather than the code the joins generate for data. SPARK-59764 (#59017), which makes the checks run with AQE disabled, is already on `branch-4.x`.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. Tests and benchmark only.
   
   ### How was this patch tested?
   
   On `branch-4.x` with this change:
   ```
   build/sbt "sql/testOnly org.apache.spark.sql.execution.LogicalPlanTagInSparkPlanSuite org.apache.spark.sql.TPCDSQuerySuite org.apache.spark.sql.TPCDSQueryWithStatsSuite org.apache.spark.sql.TPCDSQueryANSISuite org.apache.spark.sql.TPCHQuerySuite org.apache.spark.sql.SSBQuerySuite org.apache.spark.sql.execution.debug.DebuggingSuite"
   ```
   All 642 tests passed. The results file was regenerated with `SPARK_GENERATE_BENCHMARK_FILES=1`, running the benchmark under JDK 17. `dev/scalastyle` passes.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 5.5)
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-59765][SQL][TESTS][4.x] Generate broadcast joins in full when measuring benchmark query codegen [spark]

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on PR #59039:
URL: https://github.com/apache/spark/pull/59039#issuecomment-5834909771

   Merging to 4.x. Thank you, @dongjoon-hyun for review.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-59765][SQL][TESTS][4.x] Generate broadcast joins in full when measuring benchmark query codegen [spark]

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on PR #59039:
URL: https://github.com/apache/spark/pull/59039#issuecomment-5834936519

   **Merge Summary:**
   - merged into branch-4.x https://github.com/apache/spark/commit/358c25c6ec486fab5b564d21174de12562fd0a3a
   
   *Posted by `merge_spark_pr.py`*


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-59765][SQL][TESTS][4.x] Generate broadcast joins in full when measuring benchmark query codegen [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #59039:
URL: https://github.com/apache/spark/pull/59039#issuecomment-5834333334

   +1, LGTM. Thank you, @MaxGekk .


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-59765][SQL][TESTS][4.x] Generate broadcast joins in full when measuring benchmark query codegen [spark]

Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk closed pull request #59039: [SPARK-59765][SQL][TESTS][4.x] Generate broadcast joins in full when measuring benchmark query codegen
URL: https://github.com/apache/spark/pull/59039


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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