You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2022/11/24 01:37:44 UTC

[spark] branch master updated: [SPARK-41183][SQL][FOLLOWUP] Change the name from injectPlanNormalizationRules to injectPlanNormalizationRule

This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 957b0bc79d2 [SPARK-41183][SQL][FOLLOWUP] Change the name from injectPlanNormalizationRules to injectPlanNormalizationRule
957b0bc79d2 is described below

commit 957b0bc79d26f6859e4456d58854bd9b4a2fa0e9
Author: Wenchen Fan <we...@databricks.com>
AuthorDate: Thu Nov 24 10:37:31 2022 +0900

    [SPARK-41183][SQL][FOLLOWUP] Change the name from injectPlanNormalizationRules to injectPlanNormalizationRule
    
    ### What changes were proposed in this pull request?
    
    Followup of https://github.com/apache/spark/pull/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 <we...@databricks.com>
    Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
 .../src/main/scala/org/apache/spark/sql/SparkSessionExtensions.scala    | 2 +-
 .../test/scala/org/apache/spark/sql/SparkSessionExtensionSuite.scala    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sql/core/src/main/scala/org/apache/spark/sql/SparkSessionExtensions.scala b/sql/core/src/main/scala/org/apache/spark/sql/SparkSessionExtensions.scala
index 6b3744fe02d..dc3dfaae4ff 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/SparkSessionExtensions.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/SparkSessionExtensions.scala
@@ -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
   }
 
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/SparkSessionExtensionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/SparkSessionExtensionSuite.scala
index f5f04eabec0..66507756e89 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/SparkSessionExtensionSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/SparkSessionExtensionSuite.scala
@@ -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
       }
     }


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