Skip to content

feat: Add HashJoin support for BuildRight#437

Merged
viirya merged 20 commits intoapache:mainfrom
viirya:hash_join_build_right
Jun 8, 2024
Merged

feat: Add HashJoin support for BuildRight#437
viirya merged 20 commits intoapache:mainfrom
viirya:hash_join_build_right

Conversation

@viirya
Copy link
Member

@viirya viirya commented May 16, 2024

Which issue does this PR close?

Closes #390.

Rationale for this change

What changes are included in this PR?

How are these changes tested?

@viirya viirya force-pushed the hash_join_build_right branch from 152df93 to 383ff05 Compare May 18, 2024 16:27
@codecov-commenter
Copy link

codecov-commenter commented May 18, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 34.30%. Comparing base (fcf7d5b) to head (f1d5aeb).
Report is 8 commits behind head on main.

Files Patch % Lines
.../scala/org/apache/comet/serde/QueryPlanSerde.scala 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #437      +/-   ##
============================================
+ Coverage     34.17%   34.30%   +0.13%     
- Complexity      850      855       +5     
============================================
  Files           116      116              
  Lines         38547    38653     +106     
  Branches       8523     8545      +22     
============================================
+ Hits          13172    13259      +87     
- Misses        22609    22647      +38     
+ Partials       2766     2747      -19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +2420 to +2425
join match {
case b: BroadcastHashJoinExec if b.isNullAwareAntiJoin =>
// DataFusion HashJoin LeftAnti has bugs on null keys.
withInfo(join, "DataFusion doesn't support null-aware anti join")
return None
case _ => // no-op
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@viirya
Copy link
Member Author

viirya commented May 28, 2024

This requires apache/datafusion#10702 to be in DataFusion new release.

@viirya viirya marked this pull request as ready for review May 29, 2024 01:56
}
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/DynamicPartitionPruningSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/DynamicPartitionPruningSuite.scala
index f33432ddb6f..060f874ea72 100644
index f33432ddb6f..9cf7a9dd4e3 100644
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we need the same change for 3.4.3.diff ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@viirya viirya force-pushed the hash_join_build_right branch from d41a68e to d494b4f Compare May 30, 2024 04:59
Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I am seeing a performance regression with this PR. I am guessing it is related to the DataFusion upgrade.

@viirya
Copy link
Member Author

viirya commented Jun 8, 2024

Hmm, it's weird. I've updated the plan stability results. However, CometTPCDSV2_7_PlanStabilitySuite still fails on q5a for Spark 4.0 only in CI. And I cannot reproduce it locally. So my local generated q5a query plans are different to CI?

@viirya
Copy link
Member Author

viirya commented Jun 8, 2024

Hmm, it's weird. I've updated the plan stability results. However, CometTPCDSV2_7_PlanStabilitySuite still fails on q5a for Spark 4.0 only in CI. And I cannot reproduce it locally. So my local generated q5a query plans are different to CI?

I finally produced the query plan same as CI by following same commands of the CI pipeline.

@viirya viirya merged commit 32c61f5 into apache:main Jun 8, 2024
@viirya
Copy link
Member Author

viirya commented Jun 8, 2024

Merged. Thanks @kazuyukitanimura @andygrove

@viirya viirya deleted the hash_join_build_right branch June 8, 2024 07:09
himadripal pushed a commit to himadripal/datafusion-comet that referenced this pull request Sep 7, 2024
* feat: Add HashJoin support for BuildRight

* Enable test

* Update plan stability

* More

* Update plan stability

* Refine

* Fix

* Update diffs to fix Spark tests

* Update diff

* Update Spark 3.4.3 diff

* Use BuildSide enum

* Update diffs

* Update plan stability for Spark 4.0

* Update q5a plan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add support for BuildRight

4 participants