BigQuery: Add support for select expr star#1680
Merged
iffyio merged 1 commit intoapache:mainfrom Jan 28, 2025
Merged
Conversation
9517f5d to
c666d8d
Compare
alamb
approved these changes
Jan 27, 2025
| /// Expression is an object name. | ||
| /// e.g. `alias.*` or even `schema.table.*` | ||
| ObjectName(ObjectName), | ||
| /// Select star on an arbitrary expression. |
| // Identifier wildcard expansion. | ||
| let select = dialects.verified_only_select("SELECT foo.bar.* FROM T"); | ||
| let SelectItem::QualifiedWildcard(SelectItemQualifiedWildcardKind::ObjectName(object_name), _) = | ||
| only(&select.projection) |
| ); | ||
|
|
||
| // Arbitrary compound expression with wildcard expansion. | ||
| let select = dialects.verified_only_select("SELECT foo - bar.* FROM T"); |
Contributor
Author
There was a problem hiding this comment.
😅 thankfully the query isn't semantically valid, maybe the test is misleading in that sense, I added it only to verify that the parser accepts arbitrary expressions and wildcard on variables, but as far as binary operators specifically combined with the wildcard syntax wouldn't have meaning in BigQuery either
Adds support for wildcard expression on arbitrary expressions in select lists. Example: ```sql SELECT l.LOCATION[offset(0)].* FROM l ``` https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#select_expression_star
c666d8d to
c0f00fd
Compare
Vedin
pushed a commit
to Embucket/datafusion-sqlparser-rs
that referenced
this pull request
Feb 3, 2025
Vedin
pushed a commit
to Embucket/datafusion-sqlparser-rs
that referenced
this pull request
Feb 3, 2025
Vedin
added a commit
to Embucket/datafusion-sqlparser-rs
that referenced
this pull request
Feb 3, 2025
This reverts commit 73dbd91.
This was referenced Mar 8, 2025
ayman-sigma
pushed a commit
to sigmacomputing/sqlparser-rs
that referenced
this pull request
Apr 10, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds support for wildcard expression on arbitrary
expressions in select lists.
Example:
https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#select_expression_star