-
-
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 Struct
field selection in the SQL engine, RENAME
and REPLACE
select wildcard options
#17109
Merged
ritchie46
merged 7 commits into
pola-rs:main
from
alexander-beedie:sql-struct-field-select
Jun 24, 2024
Merged
feat: Support Struct
field selection in the SQL engine, RENAME
and REPLACE
select wildcard options
#17109
ritchie46
merged 7 commits into
pola-rs:main
from
alexander-beedie:sql-struct-field-select
Jun 24, 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 21, 2024 10:15
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 21, 2024
alexander-beedie
force-pushed
the
sql-struct-field-select
branch
from
June 21, 2024 10:18
cc3f5dd
to
b90ae1d
Compare
alexander-beedie
force-pushed
the
sql-struct-field-select
branch
from
June 21, 2024 13:59
b90ae1d
to
3bb8050
Compare
alexander-beedie
force-pushed
the
sql-struct-field-select
branch
from
June 21, 2024 20:39
239ddde
to
2cfdfb2
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17109 +/- ##
==========================================
+ Coverage 80.86% 80.89% +0.03%
==========================================
Files 1456 1456
Lines 191141 191403 +262
Branches 2728 2742 +14
==========================================
+ Hits 154562 154836 +274
+ Misses 36073 36058 -15
- Partials 506 509 +3 ☔ View full report in Codecov by Sentry. |
ritchie46
reviewed
Jun 22, 2024
alexander-beedie
changed the title
feat: Support
feat: Support Jun 23, 2024
Struct
field selection in the SQL engineStruct
field selection in the SQL engine, RENAME
and REPLACE
select wildcard options
ritchie46
approved these changes
Jun 24, 2024
This was referenced Jun 24, 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.
Closes #16651.
Struct
field selection and wildcard expansion.SELECT * RENAME (…)
syntax (also works with struct wildcards).SELECT * REPLACE (…)
syntax (also works with struct wildcards).Also
ORDER BY <n>
ordinal syntax picked the wrong columns to sort.QualifiedWildcard
&CompoundIdentifier
SQL → Expr translation.SELECT tbl.* ILIKE …
→ "ILIKE wildcard option is currently unsupported".Note
Struct
fields in JOIN constraints requires some more involved updates to table/column resolution, so that will come as a separate/follow-up PR (this one is complicated enough already!) 🤔REPLACE
andRENAME
modifiers in the same statement once this upstream fix (Fix SnowflakeSELECT *
wildcardREPLACE ... RENAME
order apache/datafusion-sqlparser-rs#1321) is available.Example
Select, filter, and sort on
Struct
field values from SQL:Wildcard
Struct
selection/expansion, withREPLACE
wildcard option:Wildcard selection/expansion of nested
Struct
, withRENAME
wildcard option: