When parsing SQL in BigQuery dialect, character literals may be enclosed in single- or double-quotes, and use backslashes as escapes. In standard SQL, and most dialects, character literals are enclosed in single-quotes only, and use single-quotes as the escape character.
For example:
'Let''s call him "Elvis"!' /* valid in Oracle, PostgreSQL, etc. */ 'Let\'s call him "Elvis"!' /* valid in BigQuery */ "Let's call him \"Elvis\"!" /* valid in BigQuery */
To control this feature, we add
enum CharLiteralStyle { STANDARD, BQ_SINGLE, BQ_DOUBLE }
and to interface SqlParser.Config we add method Set<CharLiteralStyle> charLiteralStyles().
- relates to
-
CALCITE-4230 When parsing SQL in BigQuery dialect, split quoted table names that contain dots
-
- Closed
-