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/02/11 12:24:23 UTC

[GitHub] cloud-fan commented on a change in pull request #22198: [SPARK-25121][SQL] Supports multi-part table names for broadcast hint resolution

cloud-fan commented on a change in pull request #22198: [SPARK-25121][SQL] Supports multi-part table names for broadcast hint resolution
URL: https://github.com/apache/spark/pull/22198#discussion_r255484823
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveHints.scala
 ##########
 @@ -47,20 +49,49 @@ object ResolveHints {
    *
    * This rule must happen before common table expressions.
    */
-  class ResolveBroadcastHints(conf: SQLConf) extends Rule[LogicalPlan] {
+  class ResolveBroadcastHints(conf: SQLConf, catalog: SessionCatalog) extends Rule[LogicalPlan] {
     private val BROADCAST_HINT_NAMES = Set("BROADCAST", "BROADCASTJOIN", "MAPJOIN")
 
     def resolver: Resolver = conf.resolver
 
-    private def applyBroadcastHint(plan: LogicalPlan, toBroadcast: Set[String]): LogicalPlan = {
+    private def namePartsWithDatabase(nameParts: Seq[String], database: String): Seq[String] = {
+      if (nameParts.size == 1) {
+        database +: nameParts
+      } else {
+        nameParts
+      }
+    }
+
+    private def matchedTableIdentifier(
+        nameParts: Seq[String],
+        tableIdent: IdentifierWithDatabase): Boolean = {
 
 Review comment:
   shouldn't it be `TableIdentifier`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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