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
I also tried to do things like SELECT timestamp """{"name": "Alice", "age": 30}""" which also fails.
Error message is:
called `Result::unwrap()` on an `Err` value: ParserError("Expected: end of statement, found: \"\"\"{\"name\": \"Alice\", \"age\": 30}\"\"\" at Line: 7, Column: 13")
The text was updated successfully, but these errors were encountered:
The issue here is that parse_literal_string which is used by TypedString doesn't support quote styles other than single or double quoted strings.
Trying to fix this I came across two related issues:
currently TypedString doesn't retain any knowledge about the used quote style, so it doesn't roundtrip properly. It always formats as a single quoted string.
We can fix this by making TypedString contain a Value instead of a String. This also gives us support for other quote styles, addressing the issue reported here.
fmt::Display for EscapeQuotedString doesn't take into account the dialect, producing strings like 'foo''bar' which is invalid in BQ (should be 'foo\'bar'). So something like this SELECT JSON "{\"foo\":\"bar's\"}" currently also doesn't get formatted correctly
Not sure how to fix this one, seems a bit more involved.
i.e
select JSON """{"name": "Alice", "age": 30}"""
fails. More examples can also be found here.
I also tried to do things like
SELECT timestamp """{"name": "Alice", "age": 30}"""
which also fails.Error message is:
The text was updated successfully, but these errors were encountered: