-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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: Support SQL SELECT * ILIKE
wildcard syntax
#17169
Merged
ritchie46
merged 7 commits into
pola-rs:main
from
alexander-beedie:select-wildcard-ilike
Jun 28, 2024
Merged
feat: Support SQL SELECT * ILIKE
wildcard syntax
#17169
ritchie46
merged 7 commits into
pola-rs:main
from
alexander-beedie:select-wildcard-ilike
Jun 28, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alexander-beedie
requested review from
ritchie46,
stinodego,
c-peters,
MarcoGorelli,
reswqa and
orlp
as code owners
June 24, 2024 22:31
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 24, 2024
alexander-beedie
force-pushed
the
select-wildcard-ilike
branch
from
June 24, 2024 22:39
76cb833
to
4be0f71
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17169 +/- ##
==========================================
- Coverage 80.94% 80.82% -0.13%
==========================================
Files 1464 1464
Lines 191956 192043 +87
Branches 2742 2744 +2
==========================================
- Hits 155385 155224 -161
- Misses 36062 36308 +246
- Partials 509 511 +2 ☔ View full report in Codecov by Sentry. |
feat: Support `SELECT * ILIKE` wildcard syntax feat: Support `SELECT * ILIKE` wildcard syntax in SQL interface
alexander-beedie
force-pushed
the
select-wildcard-ilike
branch
2 times, most recently
from
June 25, 2024 07:11
3d04925
to
8a8260f
Compare
alexander-beedie
force-pushed
the
select-wildcard-ilike
branch
from
June 25, 2024 17:23
8a8260f
to
892f872
Compare
alexander-beedie
force-pushed
the
select-wildcard-ilike
branch
2 times, most recently
from
June 25, 2024 20:29
0e088ad
to
8fff43c
Compare
alexander-beedie
force-pushed
the
select-wildcard-ilike
branch
from
June 25, 2024 20:52
8fff43c
to
8a77789
Compare
alexander-beedie
changed the title
feat: Support
feat: Support SQL Jun 26, 2024
SELECT * ILIKE
wildcard syntax in SQL interfaceSELECT * ILIKE
wildcard syntax
ritchie46
approved these changes
Jun 28, 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
enhancement
New feature or an improvement of an existing feature
python
Related to Python Polars
rust
Related to Rust Polars
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Following on from #17109, which added
RENAME
andREPLACE
modifiers:New
SELECT * ILIKE …
wildcard select-modifier1.This is a pattern-match on column names, using SQL "%" and "_" glob chars.
Also
ORDER BY
andREPLACE
modifier (should sort on post-replace values).ORDER BY
clause if also usingSELECT * EXCLUDE
.ORDER BY
on columns targeted byRENAME
modifier.Note
With this final addition, we will support all
SELECT *
wildcard modifiers for the 1.0 🎉Examples
Demonstrate use of
SELECT * ILIKE
:Combine
ILIKE
withRENAME
, sort with ordinal-basedORDER BY
:Correctly apply
ORDER BY
on a column targeted by theRENAME
modifier:Footnotes
Note that these
SELECT *
wildcard options have become very popular in the last couple of years, with DuckDB, Snowflake, Databricks, and other vendors jumping on to the syntax, but PostgreSQL (our usual syntax target) actually has yet to implement it. However, given its popularity I think it's important that we have it (and it's purely additive; we lose nothing by supporting it) ✌️ ↩