[
https://issues.apache.org/jira/browse/CALCITE-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Hyde resolved CALCITE-4247.
----------------------------------
Fix Version/s: 1.26.0
Resolution: Fixed
Fixed in
[c1052b34|https://github.com/apache/calcite/commit/c1052b343724c4a95bcf25419b70bc6032e0846b].
> When parsing SQL in BigQuery dialect, character literals may be enclosed in
> single- or double-quotes, and use backslashes as escapes
> ------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CALCITE-4247
> URL: https://issues.apache.org/jira/browse/CALCITE-4247
> Project: Calcite
> Issue Type: Bug
> Components: babel
> Reporter: Julian Hyde
> Assignee: Julian Hyde
> Priority: Major
> Fix For: 1.26.0
>
>
> 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:
> {noformat}
> '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 */
> {noformat}
> To control this feature, we add
> {code}
> enum CharLiteralStyle { STANDARD, BQ_SINGLE, BQ_DOUBLE }
> {code}
> and to {{interface SqlParser.Config}} we add method {{Set<CharLiteralStyle>
> charLiteralStyles()}}.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)