You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "yanjing.wang (Jira)" <ji...@apache.org> on 2021/02/24 03:12:00 UTC

[jira] [Created] (CALCITE-4512) 'case when' project alias equals 'when condition column name or then column name' causes validation error

yanjing.wang created CALCITE-4512:
-------------------------------------

             Summary: 'case when' project alias equals 'when condition column name or then column name' causes validation error
                 Key: CALCITE-4512
                 URL: https://issues.apache.org/jira/browse/CALCITE-4512
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.26.0
            Reporter: yanjing.wang
             Fix For: 1.27.0


String sql = "select case when ds > 20200103 then ds else id end as ds, count(distinct id) from depts group by case when ds > 20200103 then ds else id end";

 

'case when ds > 20200103 then ds else id end as ds'  has alias ds, and 'when ds > 20200103' has column ds or ' then ds ' has ds, validation raises exception.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)