[
https://issues.apache.org/jira/browse/CALCITE-5774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17732067#comment-17732067
]
Guillaume Massé commented on CALCITE-5774:
------------------------------------------
[~nobigo]
ah indeed it's not related to `withCaseClausesOnNewLines(true)` but with the
typo coercions to varchar(6). is there a way to avoid this behavior? I would
rather have a `RelDataType.PRECISION_NOT_SPECIFIED` inferred in this case.
> withCaseClausesOnNewLines(true) creates invalid string literal
> --------------------------------------------------------------
>
> Key: CALCITE-5774
> URL: https://issues.apache.org/jira/browse/CALCITE-5774
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.34.0
> Reporter: Guillaume Massé
> Priority: Major
>
> It tries incorrectly to align ending quotes:
>
> input:
>
> {code:java}
> select f(case when a = 0 then 'foobar' when a = 1 then 'bar' else 'baz'
> end){code}
>
>
> output:
> {code:java}
> select f(case
> when a = 0 then 'foobar'
> when a = 1 then 'bar '
> else 'baz'
> end){code}
>
> expected:
> {code:java}
> select f(case
> when a = 0 then 'foobar'
> when a = 1 then 'bar'
> else 'baz'
> end){code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)