sunchao commented on a change in pull request #34779:
URL: https://github.com/apache/spark/pull/34779#discussion_r761472725



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/SparkSessionExtensionSuite.scala
##########
@@ -95,6 +95,12 @@ class SparkSessionExtensionSuite extends SparkFunSuite {
     }
   }
 
+  test("SPARK-37518: inject a early scan push down rule") {

Review comment:
       nit: I think we only require JIRA id for bug fixes and regressions?

##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/SparkSessionExtensions.scala
##########
@@ -226,6 +226,21 @@ class SparkSessionExtensions {
     preCBORules += builder
   }
 
+  private[this] val earlyScanPushDownRules = mutable.Buffer.empty[RuleBuilder]
+
+  private[sql] def buildEarlyScanPushDownRules(session: SparkSession): 
Seq[Rule[LogicalPlan]] = {
+    earlyScanPushDownRules.map(_.apply(session)).toSeq
+  }
+
+  /**
+   * Inject an optimizer `Rule` builder that rewrites logical plans into the 
[[SparkSession]].
+   * The injected rules will be executed once after the operator optimization 
batch and
+   * after any push down optimization rules.
+   */
+  def injectEarlyScanPushDownRules(builder: RuleBuilder): Unit = {

Review comment:
       nit: `injectEarlyScanPushDownRules` -> `injectEarlyScanPushDownRule`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to