Skip to content

chore: fix ConstantFolding rule exclusion for benchmarks#4689

Merged
comphead merged 1 commit into
apache:mainfrom
comphead:chore
Jun 19, 2026
Merged

chore: fix ConstantFolding rule exclusion for benchmarks#4689
comphead merged 1 commit into
apache:mainfrom
comphead:chore

Conversation

@comphead

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #4656 .

Rationale for this change

Three Comet benchmark files set spark.sql.optimizer.constantFolding.enabled = false, but this Spark config does not exist - it is silently ignored, so constant folding has been running during these benchmarks the whole time.

Spark has no per-rule on/off flag for ConstantFolding. The canonical way to disable an individual Catalyst rule spark.sql.optimizer.excludedRules, which takes a comma-separated list of fully-qualified rule class names (see SQLConf.OPTIMIZER_EXCLUDED_RULES). The rest of the Comet test suite (CometExpressionSuite,CometStringExpressionSuite, CometArrayExpressionSuite,CometSqlFileTestSuite, etc.) already uses this pattern.

What changes are included in this PR?

How are these changes tested?

@comphead comphead changed the title chore: fix ConstantFolding rule exclusion chore: fix ConstantFolding rule exclusion for benchmarks Jun 18, 2026
@comphead comphead merged commit 2e19011 into apache:main Jun 19, 2026
17 checks passed
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.

chore: Remove invalid spark.sql.optimizer.constantFolding.enabled configuration from java benchmarks.

2 participants