You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Guillaume Massé (Jira)" <ji...@apache.org> on 2023/06/12 22:28:00 UTC

[jira] [Created] (CALCITE-5774) withCaseClausesOnNewLines(true) creates invalid string literal

Guillaume Massé created CALCITE-5774:
----------------------------------------

             Summary: withCaseClausesOnNewLines(true) creates invalid string literal
                 Key: CALCITE-5774
                 URL: https://issues.apache.org/jira/browse/CALCITE-5774
             Project: Calcite
          Issue Type: New Feature
         Environment: {code:java}
// code placeholder
{code}
            Reporter: Guillaume Massé


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)