[
https://issues.apache.org/jira/browse/CALCITE-3589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16994453#comment-16994453
]
bingfeng.guo edited comment on CALCITE-3589 at 12/12/19 9:52 AM:
-----------------------------------------------------------------
[~julianhyde] postgresql will group by the underlying column,not alias . but
calcite is group by the alias
was (Author: bingfeng):
[~julianhyde] postgresql will group by the underlying column,not alias
> SqlValidatorException when conformation is set to LENIENT
> ---------------------------------------------------------
>
> Key: CALCITE-3589
> URL: https://issues.apache.org/jira/browse/CALCITE-3589
> Project: Calcite
> Issue Type: Bug
> Reporter: bingfeng.guo
> Priority: Critical
>
> error occurs conditions (all three conditions must be met):
> * conformance = LENIENT
> * The alias of the expression in select is the same as the column name of
> the column used in the expression
> * group by or having use the above expression
> {color:#172b4d}a simple example is as follows:{color}
> {color:#ff8b00}SELECT MY_ID + 1 AS MY_ID, sum(PRICE){color}
> {color:#ff8b00}FROM tableA{color}
> {color:#ff8b00}GROUP BY MY_ID + 1{color}
> {color:#ff8b00}will {color}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)