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

Minor: reduce code duplication using rewrite_expr #5114

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jan 30, 2023

Draft as it builds on #5092

Which issue does this PR close?

Follow on to #5092

Rationale for this change

if it is easier to rewrite expressions in DataFusion, this will lower the barrier to entry to new contributors

What changes are included in this PR?

Reduces code for the common case of rewriting an expression by letting the Rust compiler capture parameters via a closure. Some rewrites (like constant folding) still need the full generality of the ExprRewriter and I did not

Are these changes tested?

covered by existing tests

Are there any user-facing changes?

No

@github-actions github-actions bot added core Core DataFusion crate logical-expr Logical plan and expressions optimizer Optimizer rules sql SQL Planner labels Jan 30, 2023
@alamb alamb marked this pull request as ready for review January 31, 2023 10:51
@alamb alamb merged commit bd64527 into apache:master Feb 1, 2023
@ursabot
Copy link

ursabot commented Feb 1, 2023

Benchmark runs are scheduled for baseline = 4c21a72 and contender = bd64527. bd64527 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

@alamb alamb deleted the alamb/simpler_rewrites branch July 26, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate logical-expr Logical plan and expressions optimizer Optimizer rules sql SQL Planner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants