Skip to content

Commit

Permalink
[SPARK-41183][SQL][FOLLOWUP] Change the name from injectPlanNormaliza…
Browse files Browse the repository at this point in the history
…tionRules to injectPlanNormalizationRule

### What changes were proposed in this pull request?

Followup of #38692. To follow other APIs in `SparkSessionExtensions`, the name should be `inject...Rule` and `build...Rules`.

### Why are the changes needed?

typo fix

### Does this PR introduce _any_ user-facing change?

not a released API

### How was this patch tested?

n/a

Closes #38767 from cloud-fan/small.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
  • Loading branch information
cloud-fan authored and HyukjinKwon committed Nov 24, 2022
1 parent aa564b9 commit 957b0bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -230,7 +230,7 @@ class SparkSessionExtensions {
* cache hit rate by normalizing different plans to the same form. These rules should never modify
* the result of the LogicalPlan.
*/
def injectPlanNormalizationRules(builder: RuleBuilder): Unit = {
def injectPlanNormalizationRule(builder: RuleBuilder): Unit = {
planNormalizationRules += builder
}

Expand Down
Expand Up @@ -194,7 +194,7 @@ class SparkSessionExtensionSuite extends SparkFunSuite with SQLHelper {

test("inject plan normalization rules") {
val extensions = create { extensions =>
extensions.injectPlanNormalizationRules { session =>
extensions.injectPlanNormalizationRule { session =>
org.apache.spark.sql.catalyst.optimizer.PushDownPredicates
}
}
Expand Down

0 comments on commit 957b0bc

Please sign in to comment.