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

Fix regression in SQL parser related to resolution of aliased expressions #3165

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

andygrove
Copy link
Member

Which issue does this PR close?

Closes #3160

Rationale for this change

Fixes a regression in supported SQL. See the issue for details. This was discovered when running a private regression suite based on a popular SQL benchmark.

What changes are included in this PR?

Partially rolled back changes from #3003

I am not overly happy with the changes and there is definitely more work to do in the parser in this area but this at least fixes a major regression.

Are there any user-facing changes?

No

@github-actions github-actions bot added the sql SQL Planner label Aug 15, 2022
@andygrove andygrove requested a review from alamb August 15, 2022 20:46
@andygrove andygrove mentioned this pull request Aug 15, 2022
17 tasks
@@ -4819,6 +4814,21 @@ mod tests {
quick_test(sql, expected);
}

#[test]
fn order_by_unaliased_name() {
Copy link
Contributor

Choose a reason for hiding this comment

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

💯 for the test

@codecov-commenter
Copy link

Codecov Report

Merging #3165 (c905afb) into master (5778ef2) will increase coverage by 0.00%.
The diff coverage is 90.00%.

@@           Coverage Diff           @@
##           master    #3165   +/-   ##
=======================================
  Coverage   85.87%   85.87%           
=======================================
  Files         291      291           
  Lines       52758    52759    +1     
=======================================
+ Hits        45307    45308    +1     
  Misses       7451     7451           
Impacted Files Coverage Δ
datafusion/sql/src/planner.rs 81.96% <90.00%> (-0.04%) ⬇️
datafusion/expr/src/logical_plan/plan.rs 77.43% <0.00%> (ø)
datafusion/common/src/scalar.rs 84.61% <0.00%> (+0.06%) ⬆️

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

@alamb alamb merged commit 9543d38 into apache:master Aug 15, 2022
@ursabot
Copy link

ursabot commented Aug 15, 2022

Benchmark runs are scheduled for baseline = 36def8f and contender = 9543d38. 9543d38 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

@andygrove andygrove deleted the fix-regression-order-by-alias branch January 27, 2023 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sql SQL Planner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression in SQL support for ORDER BY and aliased expressions
4 participants