[ 
https://issues.apache.org/jira/browse/SPARK-32399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17214426#comment-17214426
 ] 

Ruslan Dautkhanov commented on SPARK-32399:
-------------------------------------------

[~chengsu] thank you for all the Shuffled Hash Join improvements.

I've tested Full Outer Join case using master and found that both SMJ and SHJ 
performed exactly the same - 14 minutes of runtime for both types of joins.

One table being just 300k records and another table 25B records / 2Tb of data. 
Ran tests multiple times and it's consistent. 

What I don't understand about SHJ is - it still seems does a complete shuffling 
of the larger table:

!Screen Shot 2020-10-14 at 12.30.07 PM.png|width=583,height=514!

Is this expected? 

To be honest, I have not used SHJ as SMJ was a safer bet before all the new 
improvements in Spark 3.1. Let me know what I miss. The join is based on a 
composite key, so not sure if it has anything to do with this. Thanks!

 

> Support full outer join in shuffled hash join
> ---------------------------------------------
>
>                 Key: SPARK-32399
>                 URL: https://issues.apache.org/jira/browse/SPARK-32399
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.1.0
>            Reporter: Cheng Su
>            Assignee: Cheng Su
>            Priority: Minor
>             Fix For: 3.1.0
>
>         Attachments: Screen Shot 2020-10-14 at 12.30.07 PM.png
>
>
> Currently for SQL full outer join, spark always does a sort merge join no 
> matter of how large the join children size are. Inspired by recent discussion 
> in [https://github.com/apache/spark/pull/29130#discussion_r456502678] and 
> [https://github.com/apache/spark/pull/29181], I think we can support full 
> outer join in shuffled hash join in a way that - when looking up stream side 
> keys from build side {{HashedRelation}}. Mark this info inside build side 
> {{HashedRelation}}, and after reading all rows from stream side, output all 
> non-matching rows from build side based on modified {{HashedRelation}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to