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

Implement Eq trait for Expr and nested types #3381

Merged
merged 1 commit into from
Sep 7, 2022
Merged

Conversation

jdye64
Copy link
Contributor

@jdye64 jdye64 commented Sep 6, 2022

Rationale for this change

Expr is currently not compatible with the HashSet container because it does not implement to std::cmp::Eq trait. This PR implements that trait for Expr and any nested components

@github-actions github-actions bot added the logical-expr Logical plan and expressions label Sep 6, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #3381 (705522f) into master (c89b10f) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3381      +/-   ##
==========================================
- Coverage   85.58%   85.57%   -0.01%     
==========================================
  Files         296      296              
  Lines       54179    54179              
==========================================
- Hits        46367    46366       -1     
- Misses       7812     7813       +1     
Impacted Files Coverage Δ
datafusion/expr/src/expr.rs 76.08% <ø> (ø)
datafusion/expr/src/logical_plan/plan.rs 77.61% <ø> (+0.33%) ⬆️
datafusion/expr/src/udaf.rs 37.50% <ø> (-12.50%) ⬇️
datafusion/expr/src/udf.rs 60.00% <ø> (ø)
datafusion/core/src/physical_plan/metrics/value.rs 86.93% <0.00%> (-0.51%) ⬇️

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

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

I think this looks good to me. Thanks @jdye64

@@ -1430,6 +1430,8 @@ impl PartialEq for Subquery {
}
}

impl Eq for Subquery {}
Copy link
Contributor

Choose a reason for hiding this comment

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

well I suppose Eq is satisfied given that PartialEq always returns false the requirements

https://doc.rust-lang.org/std/cmp/trait.Eq.html

are satisfied in a strange sort of way

@@ -56,6 +56,8 @@ impl PartialEq for AggregateUDF {
}
}

impl Eq for AggregateUDF {}
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@alamb alamb merged commit e6d1364 into apache:master Sep 7, 2022
@ursabot
Copy link

ursabot commented Sep 7, 2022

Benchmark runs are scheduled for baseline = 43e2d91 and contender = e6d1364. e6d1364 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

MazterQyou pushed a commit to cube-js/arrow-datafusion that referenced this pull request Dec 1, 2022
MazterQyou pushed a commit to cube-js/arrow-datafusion that referenced this pull request Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logical-expr Logical plan and expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants