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

Hash binary values #3098

Merged
merged 2 commits into from Aug 12, 2022
Merged

Hash binary values #3098

merged 2 commits into from Aug 12, 2022

Conversation

Dandandan
Copy link
Contributor

Which issue does this PR close?

Closes #3050

Rationale for this change

Currently we can not group by binary values

What changes are included in this PR?

Implementing hashing for binary values. Also some first casting support (but depends on apache/arrow-rs#2402 to be impemented).

Are there any user-facing changes?

@Dandandan Dandandan marked this pull request as ready for review August 10, 2022 18:07
@github-actions github-actions bot added core Core datafusion crate sql labels Aug 10, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #3098 (c563559) into master (9956f80) will decrease coverage by 0.02%.
The diff coverage is 32.00%.

@@            Coverage Diff             @@
##           master    #3098      +/-   ##
==========================================
- Coverage   85.95%   85.92%   -0.03%     
==========================================
  Files         290      290              
  Lines       52260    52285      +25     
==========================================
+ Hits        44919    44928       +9     
- Misses       7341     7357      +16     
Impacted Files Coverage Δ
datafusion/sql/src/planner.rs 81.94% <0.00%> (-0.08%) ⬇️
datafusion/core/src/physical_plan/hash_utils.rs 40.05% <34.78%> (-0.38%) ⬇️
datafusion/expr/src/logical_plan/plan.rs 77.43% <0.00%> (ø)
datafusion/core/src/physical_plan/metrics/value.rs 87.43% <0.00%> (+0.50%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Comment on lines +534 to +553
DataType::Binary => {
hash_array!(
BinaryArray,
col,
&[u8],
hashes_buffer,
random_state,
multi_col
);
}
DataType::LargeBinary => {
hash_array!(
LargeBinaryArray,
col,
&[u8],
hashes_buffer,
random_state,
multi_col
);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

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. Thanks @Dandandan

@alamb alamb merged commit b6832d5 into apache:master Aug 12, 2022
@Dandandan
Copy link
Contributor Author

FYI @waitingkuo

@ursabot
Copy link

ursabot commented Aug 12, 2022

Benchmark runs are scheduled for baseline = b80c853 and contender = b6832d5. b6832d5 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core datafusion crate sql
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot GROUP BY Binary
6 participants