Github user yaooqinn commented on the issue:

    https://github.com/apache/spark/pull/15071
  
    @hvanhovell 
    
    For current `BroadcastHashJoinExec`, we generate join code for key is not 
unique like this: 
    
    ```
    while (matches.hasnext) {
        matched = matches.next
        check and read stream side row fields
        check and read build side row fieldes
        reset result row
        write stream side row fields to result row
        write stream side row fields to result row
        append(result row)
    }
    ```
    
    For some cases, we don't need to check/read/write the steam side repeatedly 
in such while circle, e.g. `Inner Join with BuildRight`, or `BuildLeft &&  all 
left side fields are fixed length` and so on. we may generate the code as below:
    
    ```
    check and read stream side row fields
    reset result row
    write stream side row fields to result row
    while (matches.hasnext)
    {
        matched = matches.next
        check and read build side row fieldes
        write stream side row fields to result row
        append(result row)
    }
    ```
    



---
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