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

Array access notation on function call results in broken SQL #35

Closed
rgehan opened this issue Dec 6, 2021 · 0 comments
Closed

Array access notation on function call results in broken SQL #35

rgehan opened this issue Dec 6, 2021 · 0 comments
Assignees

Comments

@rgehan
Copy link

rgehan commented Dec 6, 2021

It seems SQLValidator has issues with array access notation on the result of a function call (both with OFFSET and SAFE_OFFSET)

-- Before
SELECT SPLIT(list, ':')[SAFE_OFFSET(0)] item
FROM mytable

-- After
SELECT SPLIT(list, ':') [
FROM mytable

Note that without the function call before, the format is correct:

-- Before
SELECT arr[OFFSET(0)] item FROM mytable

-- After
SELECT arr[OFFSET(0)] item
FROM mytable
@David-Wobrock David-Wobrock self-assigned this Dec 22, 2021
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

No branches or pull requests

2 participants