Skip to content

Commit 957b0bc

Browse files
cloud-fanHyukjinKwon
authored andcommitted
[SPARK-41183][SQL][FOLLOWUP] Change the name from injectPlanNormalizationRules 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>
1 parent aa564b9 commit 957b0bc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

sql/core/src/main/scala/org/apache/spark/sql/SparkSessionExtensions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ class SparkSessionExtensions {
230230
* cache hit rate by normalizing different plans to the same form. These rules should never modify
231231
* the result of the LogicalPlan.
232232
*/
233-
def injectPlanNormalizationRules(builder: RuleBuilder): Unit = {
233+
def injectPlanNormalizationRule(builder: RuleBuilder): Unit = {
234234
planNormalizationRules += builder
235235
}
236236

sql/core/src/test/scala/org/apache/spark/sql/SparkSessionExtensionSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class SparkSessionExtensionSuite extends SparkFunSuite with SQLHelper {
194194

195195
test("inject plan normalization rules") {
196196
val extensions = create { extensions =>
197-
extensions.injectPlanNormalizationRules { session =>
197+
extensions.injectPlanNormalizationRule { session =>
198198
org.apache.spark.sql.catalyst.optimizer.PushDownPredicates
199199
}
200200
}

0 commit comments

Comments
 (0)