Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/14132
  
    Hi, @cloud-fan , @yhuai , @hvanhovell , and @rxin .
    
    The remaining comment is about matching algorithm. While digging Hive's 
dead code, I suddenly feel it's useless because Hive does not use it any more.
    
    - Case 1: I think we agree to use DFS to match the first `t1` in the 
following query.
     ```
    select /*+ MAPJOIN(t1) */ * from t1 JOIN t1 JOIN t1 JOIN t1
    == Optimized Logical Plan ==
    Join Inner
    :- Join Inner
    :  :- Join Inner
    :  :  :- BroadcastHint
    :  :  :  +- Range (0, 10, splits=8)
    :  :  +- Range (0, 10, splits=8)
    :  +- Range (0, 10, splits=8)
    +- Range (0, 10, splits=8)
    ```
    
    - Case 2: What should we do for the following query? (The following is just 
the current behaviors)
     ```
    SELECT /*+ MAPJOIN(t1) */ * FROM (SELECT * FROM t1) x JOIN t1
    == Optimized Logical Plan ==
    Join Inner
    :- BroadcastHint
    :  +- Range (0, 10, splits=8)
    +- Range (0, 10, splits=8)
    ```
    
    Until now, I thought the current behavior is an intuitive result. But, if 
there is another direction for `case 2`, I will try to find a way satisfying 
both cases. How can I proceed this PR?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to