You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
impl fmt::Display for EscapeQuotedString (which is used when formatting a Value expr) uses double quote character escaping (like '' or "") which is a syntax error in BigQuery.
To fix this, I think we need to make this method aware of the dialect. And potentially add a new supports rule (like supports_backslash_escaping?) If someone could chime in on the approach I can take a stab at it.
Here is a failing test case you can add to tests/sqlparser_bigquery.rs
impl fmt::Display for EscapeQuotedString
(which is used when formatting a Value expr) uses double quote character escaping (like''
or""
) which is a syntax error in BigQuery.This was also reported in PRQL: PRQL/prql#5099
To fix this, I think we need to make this method aware of the dialect. And potentially add a new supports rule (like supports_backslash_escaping?) If someone could chime in on the approach I can take a stab at it.
Here is a failing test case you can add to tests/sqlparser_bigquery.rs
Both of these are valid BigQuery syntax. They get parsed into the AST correctly but get formatted incorrectly.
The text was updated successfully, but these errors were encountered: