Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/7592#issuecomment-124422975
  
    As I said, this is OK.
    
    Here are some ideas on how to improve joins:
    
    1. We can still use broadcast to share the data, but we can have the 
UnsafeJoin operator that understands your binary encoding, and just returns 
data directly from there, rather than relying on an intermediate 
MutableCompactBuffer. You also don't need a thread local variable here.
    
    2. The UnsafeJoin should be able to just combine the two input UnsafeRows 
into one UnsafeRow, without any intermediate JoinedRow (which also happen to be 
a bottleneck).
    
    3. In most dimensional joins, there is an 1-to-1 mapping between join key 
and value. In addition, in TPC-DS queries, the join keys are monotonically 
increasing integers on the dimension tables. As a result, we don't need a hash 
map. We can just store the key/values in an array like structure, and have a 
unique local join operator that exploits this fact.
    
    And as you can see, most of the above actually require doing custom things 
to exploit specificity, in order to improve performance.
    



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