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(bigquery): allow SPLIT call with 1 argument #1770

Merged
merged 3 commits into from
Jun 13, 2023
Merged

Conversation

georgesittas
Copy link
Collaborator

@georgesittas georgesittas commented Jun 13, 2023

Bonus: reordered some tests to partition them into validate_all / validate_identity & sorted functions in alphabetical order

Comment on lines 194 to 197
"SPLIT": lambda args: exp.Split(
# https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#split
this=seq_get(args, 0), expression=seq_get(args, 1) or exp.Literal.string(",")
),
Copy link
Collaborator Author

@georgesittas georgesittas Jun 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only actual addition (& the corresponding test)

@georgesittas georgesittas merged commit 697c8b1 into main Jun 13, 2023
@georgesittas georgesittas deleted the jo/bigquery_split branch June 13, 2023 21:44
adrianisk pushed a commit to adrianisk/sqlglot that referenced this pull request Jun 21, 2023
* Fix(bigquery): allow SPLIT call with 1 argument

* Formatting

* Reorder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants