Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support anti join #482

Merged
merged 14 commits into from
Jun 4, 2021
Merged

Support anti join #482

merged 14 commits into from
Jun 4, 2021

Conversation

Dandandan
Copy link
Contributor

@Dandandan Dandandan commented Jun 2, 2021

Which issue does this PR close?

Closes #460

Rationale for this change

This can be used to support queries with NOT IN or NOT EXISTS.

What changes are included in this PR?

Add anti join to hash join implementation.
What's not in this PR

  • Anti join sql (should be added to sqlparser if we want to) syntax
  • Using the anti join in the planner for not in / not exists

Are there any user-facing changes?

@Dandandan Dandandan mentioned this pull request Jun 2, 2021
@Dandandan Dandandan marked this pull request as ready for review June 3, 2021 06:25
@codecov-commenter
Copy link

Codecov Report

Merging #482 (e0da7a3) into master (33ff660) will decrease coverage by 0.04%.
The diff coverage is 34.61%.

❗ Current head e0da7a3 differs from pull request most recent head 3fc1615. Consider uploading reports for the commit 3fc1615 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #482      +/-   ##
==========================================
- Coverage   75.80%   75.76%   -0.05%     
==========================================
  Files         153      153              
  Lines       25924    25941      +17     
==========================================
+ Hits        19652    19653       +1     
- Misses       6272     6288      +16     
Impacted Files Coverage Δ
...sta/rust/core/src/serde/logical_plan/from_proto.rs 36.13% <0.00%> (-0.05%) ⬇️
...lista/rust/core/src/serde/logical_plan/to_proto.rs 62.25% <0.00%> (-0.08%) ⬇️
...ta/rust/core/src/serde/physical_plan/from_proto.rs 39.49% <0.00%> (-0.15%) ⬇️
...ista/rust/core/src/serde/physical_plan/to_proto.rs 50.31% <0.00%> (-0.16%) ⬇️
datafusion/src/logical_plan/builder.rs 90.08% <ø> (ø)
datafusion/src/logical_plan/plan.rs 80.62% <ø> (ø)
datafusion/src/optimizer/hash_build_probe_order.rs 58.06% <0.00%> (-0.48%) ⬇️
datafusion/src/physical_plan/planner.rs 80.19% <0.00%> (-0.14%) ⬇️
datafusion/src/physical_plan/hash_join.rs 85.17% <44.44%> (-1.28%) ⬇️
datafusion/src/physical_plan/hash_utils.rs 98.50% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33ff660...3fc1615. Read the comment docs.

"+----+----+----+",
"| a1 | b1 | c1 |",
"+----+----+----+",
"| 3 | 7 | 9 |",
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 7, 7 👍

@Dandandan Dandandan merged commit ac9d4ae into apache:master Jun 4, 2021
@alamb
Copy link
Contributor

alamb commented Jun 4, 2021

This is pretty exciting stuff @Dandandan -- thank you

@houqp houqp added ballista datafusion Changes in the datafusion crate enhancement New feature or request labels Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for anti (hash) join
4 participants