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

BigQuery ST_GEOGFROMGEOJSON breaks parser when using make_valid parameter #1083

Closed
daaain opened this issue May 20, 2021 · 1 comment · Fixed by #1111
Closed

BigQuery ST_GEOGFROMGEOJSON breaks parser when using make_valid parameter #1083

daaain opened this issue May 20, 2021 · 1 comment · Fixed by #1111
Labels
bug Something isn't working

Comments

@daaain
Copy link

daaain commented May 20, 2021

https://cloud.google.com/bigquery/docs/reference/standard-sql/geography_functions#st_geogfromgeojson

Expected Behaviour

Pass

Observed Behaviour

L:  25 | P:  89 | L027 | Unqualified reference 'make_valid' found in select with
                       | more than one referenced table/view.
L:  25 | P:  99 |  PRS | Found unparsable section: ' => true'

Steps to Reproduce

Using the optional make_valid parameter in ST_GEOGFROMGEOJSON breaks the parser.

For example:

st_geogfromgeojson(lsoa.geography, make_valid => true)

Version

app@27fc52961e2b:/app$ sqlfluff --version
sqlfluff, version 0.5.6
app@27fc52961e2b:/app$ python --version
Python 3.7.10

Configuration

[sqlfluff]
templater = dbt
dialect = bigquery
exclude_rules = L031

[sqlfluff:rules]
tab_space_size = 2
max_line_length = 100

[sqlfluff:rules:L030]
capitalisation_policy = lower

@daaain daaain added the bug Something isn't working label May 20, 2021
@barrywhart
Copy link
Member

barrywhart commented May 28, 2021

Here's a full SELECT query that produces the issue:

SELECT ST_GEOGFROMGEOJSON('{"type":"LineString","coordinates":[[1,2],[4,5]]}', make_valid => true)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants