Skip to content

Minor: reduce code duplication using rewrite_expr - #5114

Merged
alamb merged 1 commit into
apache:masterfrom
alamb:alamb/simpler_rewrites
Feb 1, 2023
Merged

alamb merged 1 commit into
apache:masterfrom
alamb:alamb/simpler_rewrites

Conversation

@alamb

@alamb alamb commented Jan 30, 2023 •

Copy link
Copy Markdown
Contributor

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 force-pushed the alamb/simpler_rewrites branch from 21966c7 to 92419bc Compare January 30, 2023 21:28
@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

ursabot commented Feb 1, 2023

Copy link
Copy Markdown

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.

3 participants