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

feat: Streamline SQL INTERVAL handling and improve related error messages, update sqlparser-rs lib #16744

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

alexander-beedie
Copy link
Collaborator

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

Double-checking against a PostgreSQL instance confirmed that unary ops are invalid when applied to interval strings (eg: INTERVAL -'7d' instead of INTERVAL '-7d'), so can simplify the parsing and raise a clear error here instead.

Also upgraded sqlparser-rs from 0.39 to 0.45; the very latest release (0.47) will require a bit more work to upgrade to so I'll tackle that later. Still pick up a few good additions/fixes with this jump.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Jun 5, 2024
@alexander-beedie alexander-beedie added the A-sql Area: Polars SQL functionality label Jun 5, 2024
@alexander-beedie alexander-beedie changed the title feat: Streamline SQL INTERVAL handling and improve related error messages, and update sqlparser-rs lib feat: Streamline SQL INTERVAL handling and improve related error messages, update sqlparser-rs lib Jun 5, 2024
Copy link

codecov bot commented Jun 5, 2024

Codecov Report

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

Project coverage is 81.45%. Comparing base (6f3fd8e) to head (6a1162f).

Files Patch % Lines
crates/polars-sql/src/keywords.rs 0.00% 1 Missing ⚠️
crates/polars-sql/src/sql_expr.rs 75.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16744   +/-   ##
=======================================
  Coverage   81.45%   81.45%           
=======================================
  Files        1413     1413           
  Lines      186306   186297    -9     
  Branches     2777     2777           
=======================================
- Hits       151750   151746    -4     
+ Misses      34036    34031    -5     
  Partials      520      520           

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

Copy link

codspeed-hq bot commented Jun 5, 2024

CodSpeed Performance Report

Merging #16744 will degrade performances by 15.15%

Comparing alexander-beedie:update-sqlparser (6a1162f) with main (6f3fd8e)

Summary

❌ 1 regressions
✅ 36 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main alexander-beedie:update-sqlparser Change
test_tpch_q14 2.1 ms 2.5 ms -15.15%

@ritchie46 ritchie46 merged commit b0cba6e into pola-rs:main Jun 6, 2024
26 checks passed
@alexander-beedie alexander-beedie deleted the update-sqlparser branch June 6, 2024 06:58
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 enhancement New feature or an improvement of an existing feature 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