sql-formatter-org / sql-formatter

A whitespace formatter for different query languages
https://sql-formatter-org.github.io/sql-formatter/
MIT License
2.35k stars 404 forks source link

[FORMATTING] BigQuery: Doesn't handle escaped quotes in raw strings #762

Open akshetpandey opened 3 months ago

akshetpandey commented 3 months ago

Input data Reproduces on https://sql-formatter-org.github.io/sql-formatter/

Which SQL and options did you provide as input? Language: BigQuery

SELECT
    regexp_extract(event_properties, r'Email": \'(.*?@.*?)\'')
FROM test

Actual Output

Parse error: Unexpected "@.*?)\'') " at line 2 column 50. SQL dialect used: "bigquery".
nene commented 3 months ago

Thanks for reporting.