Details
-
Bug
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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
a simple example is as follows:
SELECT SELLER_ID + 1 AS SELLER_ID, sum(PRICE)
FROM TEST_KYLIN_FACT
GROUP BY SELLER_ID + 1
will change to
SELECT SELLER_ID + 1 AS SELLER_ID, sum(PRICE)
FROM TEST_KYLIN_FACT
GROUP BY SELLER_ID + 1 + 1
after org.apache.calcite.sql.validate.SqlValidatorImpl#expandGroupByOrHavingExpr
Attachments
Attachments
Issue Links
- Blocked
-
CALCITE-4512 GROUP BY expression with argument name same with SELECT field and alias causes validation error
- Open
- relates to
-
CALCITE-3593 RelToSqlConverter changes target of ambiguous HAVING clause with a Project on Filter on Aggregate
- Closed
- links to