Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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 = {
Copy link
Member

Choose a reason for hiding this comment

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

How about the comment above. It mentions rules too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch! I checked other APIs and they use rules in the doc as well. It probably means all the rule that were added by this API.

planNormalizationRules += builder
}

Expand Down
Original file line number Diff line number Diff line change
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