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:55:58 UTC
[GitHub] [spark] AngersZhuuuu commented on a change in pull request #25071:
[SPARK-28292][SQL] Enable inject user-defined Hint
AngersZhuuuu 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_r301877263
##########
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:
@dongjoon-hyun
Since for Hint , it will call **ResolveHints.RemoveAllHintsafter** it handle all Spark's hint ,.
So add Hint rule in
` def injectResolutionRule(builder: RuleBuilder)`
won't work since all hint has been cleared, That's why I add a new method for hint.
----------------------------------------------------------------
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