Github user dilipbiswal commented on the issue:

    https://github.com/apache/spark/pull/22198
  
    @maropu @gatorsmile I do have a question on the semantics. 
    
    ```SQL
    use hint;
    explain extended SELECT /*+ BROADCASTJOIN(hint.s2) */ * FROM s1, s2 where 
s1.c1 = s2.c1;
    ```
    In this case, aren't we supposed to apply the hint ? even though s2 is not 
explicitly qualified with the database ?  Here is the optimized plan i see ..
    ```
    *(5) SortMergeJoin [c1#30], [c1#32], Inner
    :- *(2) Sort [c1#30 ASC NULLS FIRST], false, 0
    :  +- Exchange hashpartitioning(c1#30, 200)
    :     +- *(1) Filter isnotnull(c1#30)
    :        +- HiveTableScan [c1#30, c2#31], HiveTableRelation `hint`.`s1`, 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, [c1#30, c2#31]
    +- *(4) Sort [c1#32 ASC NULLS FIRST], false, 0
       +- Exchange hashpartitioning(c1#32, 200)
          +- *(3) Filter isnotnull(c1#32)
             +- HiveTableScan [c1#32, c2#33], HiveTableRelation `hint`.`s2`, 
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, [c1#32, c2#33]
    ```



---

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

Reply via email to