Skip to content

restore optimization for between in simplify expression rule - #3661

Merged
alamb merged 1 commit into
apache:masterfrom
liukun4515:issue_#3587
Sep 30, 2022
Merged

restore optimization for between in simplify expression rule#3661
alamb merged 1 commit into
apache:masterfrom
liukun4515:issue_#3587

Conversation

@liukun4515

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes#3587

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actionsgithub-actionsBot added core Core DataFusion crate optimizer Optimizer rules labels Sep 30, 2022
// and(expr.clone().gt_eq(*low), expr.lt_eq(*high))
// }
// }
Between {

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

In this #3396, I comment there optimization for between.

Now the type coercion has been done before this rule, the data type must be compatible.

If we meet the error when create the physical expr when evaluating the value, it must be error caused by type coercion.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #3661 (f3b3cfb) into master (a9f7cac) will decrease coverage by 0.00%.
The diff coverage is 68.75%.

@@ Coverage Diff @@## master #3661 +/- ##
==========================================
- Coverage 86.01% 86.01% -0.01% 
==========================================
Files 300 300 Lines 56583 56625 +42 ==========================================
+ Hits 48672 48704 +32 - Misses 7911 7921 +10 
Impacted FilesCoverage Δ
datafusion/core/tests/sql/predicates.rs100.00% <ø> (ø)
datafusion/optimizer/tests/integration-test.rs89.04% <ø> (ø)
datafusion/optimizer/src/simplify_expressions.rs81.86% <66.66%> (+0.26%)⬆️
datafusion/core/tests/sql/select.rs99.77% <100.00%> (ø)
datafusion/physical-expr/src/planner.rs92.36% <0.00%> (-0.70%)⬇️
datafusion/core/src/physical_plan/planner.rs77.47% <0.00%> (-0.57%)⬇️
datafusion/core/src/physical_plan/metrics/value.rs87.06% <0.00%> (-0.50%)⬇️
datafusion/expr/src/logical_plan/plan.rs77.66% <0.00%> (+0.32%)⬆️
datafusion/expr/src/operator.rs100.00% <0.00%> (+1.56%)⬆️

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

@liukun4515

Copy link
Copy Markdown
ContributorAuthor

@alamb@andygrove PTAL

@liukun4515liukun4515 changed the title restore the between for simplify expressionrestore optimization for between in simplify expressionSep 30, 2022
@liukun4515liukun4515 changed the title restore optimization for between in simplify expressionrestore optimization for between in simplify expression ruleSep 30, 2022

@alambalamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is great -- thank you @liukun4515 for following up

@alamb
alamb merged commit f862eef into apache:masterSep 30, 2022
@ursabot

Copy link
Copy Markdown

Benchmark runs are scheduled for baseline = bfc5ff0 and contender = f862eef. f862eef 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

@liukun4515
liukun4515 deleted the issue_#3587 branch September 30, 2022 13:41
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coreCore DataFusion crateoptimizerOptimizer rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

simplify between expr should consider the data type

4 participants

@liukun4515@codecov-commenter@ursabot@alamb