You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/07/10 03:45:32 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #25071: [SPARK-28292][SQL] Enable inject user-defined Hint

dongjoon-hyun commented on a change in pull request #25071: [SPARK-28292][SQL] Enable inject user-defined Hint
URL: https://github.com/apache/spark/pull/25071#discussion_r301875894
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/SparkSessionExtensions.scala
 ##########
 @@ -113,6 +113,24 @@ class SparkSessionExtensions {
     columnarRuleBuilders += builder
   }
 
+  private[this] val resolutionHintBuilders = mutable.Buffer.empty[RuleBuilder]
+
+  /**
+    * Build the analyzer resolution `Hint`s using the given [[SparkSession]].
+    */
+  private[sql] def buildResolutionHint(session: SparkSession): Seq[Rule[LogicalPlan]] = {
+    resolutionHintBuilders.map(_.apply(session))
+  }
+
+  /**
+    * Inject an analyzer resolution `Hint` builder into the [[SparkSession]]. These analyzer
+    * rules will be executed as part of the resolution phase of analysis.
+    */
+  def injectResolutionHint(builder: RuleBuilder): Unit = {
 
 Review comment:
   Did you try to use `def injectResolutionRule(builder: RuleBuilder)`? Is it insufficient for your use-case?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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