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

SELECT * REPLACE isn't currently handled #36

Closed
ybastide opened this issue Feb 10, 2022 · 0 comments · Fixed by #40
Closed

SELECT * REPLACE isn't currently handled #36

ybastide opened this issue Feb 10, 2022 · 0 comments · Fixed by #40

Comments

@ybastide
Copy link

Hi David,

https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#select_replace

sqlvalidator 0.0.18:

- SELECT * REPLACE('bar' AS foo)
+ SELECT * REPLACE

A quick unit test causes

self = <Alias: <Column: '*'> as=False 'REPLACE'>

    def __str__(self):
>       return str(self.value)
E       AttributeError: 'Alias' object has no attribute 'value'

../../sqlvalidator/grammar/sql.py:239: AttributeError

when trying to print the expression

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 a pull request may close this issue.

1 participant