Skip to content

[SPARK-56948][SQL][TESTS] Make TPCDSQueryBenchmark heap/broadcast configurable#55988

Closed
yaooqinn wants to merge 1 commit into
apache:masterfrom
yaooqinn:SPARK-56948
Closed

[SPARK-56948][SQL][TESTS] Make TPCDSQueryBenchmark heap/broadcast configurable#55988
yaooqinn wants to merge 1 commit into
apache:masterfrom
yaooqinn:SPARK-56948

Conversation

@yaooqinn
Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

Switch hardcoded .set(...) to .setIfMissing(...) for three SparkConf
keys in TPCDSQueryBenchmark:

  • spark.driver.memory
  • spark.executor.memory
  • spark.sql.autoBroadcastJoinThreshold

Also unify spark.sql.shuffle.partitions to use setIfMissing for
consistency (functionally equivalent to the existing
System.getProperty form).

Why are the changes needed?

.set(...) overrides any -Dspark.* JVM property, so users can't
tune heap/broadcast threshold without editing source. At SF10 / SF100
the hardcoded 3g heap OOMs. spark.sql.shuffle.partitions already
supported override in the same file — this extends the same pattern
to the remaining three keys.

Does this PR introduce any user-facing change?

No. Defaults unchanged.

How was this patch tested?

Verified locally that -Dspark.driver.memory=72g (etc.) flow through
to the SparkConf when launched via:

build/sbt -Dspark.driver.memory=72g \
          -Dspark.executor.memory=72g \
          -Dspark.sql.autoBroadcastJoinThreshold=10485760 \
          -Dspark.sql.shuffle.partitions=512 \
          "sql/Test/runMain ...TPCDSQueryBenchmark --data-location ..."

Without these flags, defaults remain 3g / 3g / 20MB / 4.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Opus 4.7

…figurable

Switch hardcoded .set(...) to .setIfMissing(...) for spark.driver.memory,
spark.executor.memory, and spark.sql.autoBroadcastJoinThreshold so they
can be overridden via -Dspark.* without recompiling. Also unify
spark.sql.shuffle.partitions to use setIfMissing for consistency.

Defaults unchanged.
Copy link
Copy Markdown
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you, @yaooqinn .

cc @peter-toth .

@yaooqinn yaooqinn closed this in 706b6a3 May 20, 2026
@yaooqinn yaooqinn deleted the SPARK-56948 branch May 20, 2026 04:29
@yaooqinn
Copy link
Copy Markdown
Member Author

Merged to master, thank you @dongjoon-hyun @peter-toth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants