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: Don't silently accept multi-table FROM clauses (implicit JOIN syntax) #17028

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Jun 17, 2024

Ref: #16662.

  • Catch use of old-school implicit JOIN syntax (multiple tables in the FROM clause, constraints in the WHERE) and raise an informative error; currently we require use of explicit JOIN constraints.
  • A few minor renames/cleanups, eg: process_set_expr -> process_query.

Note that I do expect to have the implicit form working in the not-too-distant future, but at the moment anyone using this syntax may experience less useful errors or incorrect results, so we need to catch it until it is properly supported.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Jun 17, 2024
@alexander-beedie alexander-beedie added the A-sql Area: Polars SQL functionality label Jun 17, 2024
Copy link

codecov bot commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 81.01%. Comparing base (69e3824) to head (4bd0442).
Report is 3 commits behind head on main.

Files Patch % Lines
crates/polars-sql/src/sql_expr.rs 77.77% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #17028   +/-   ##
=======================================
  Coverage   81.00%   81.01%           
=======================================
  Files        1448     1448           
  Lines      190543   190551    +8     
  Branches     2722     2722           
=======================================
+ Hits       154357   154366    +9     
+ Misses      35683    35682    -1     
  Partials      503      503           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ritchie46 ritchie46 merged commit 771af02 into pola-rs:main Jun 18, 2024
32 checks passed
@alexander-beedie alexander-beedie deleted the sql-implicit-join-err branch June 18, 2024 10:41
Wouittone pushed a commit to Wouittone/polars that referenced this pull request Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql Area: Polars SQL functionality fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants