Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.27.0
-
None
Description
The query
SELECT sal, COUNT(1) AS count_val FROM emp t WHERE sal = ? GROUP BY sal HAVING sal < 1000
gets translated to the following logical plan:
LogicalFilter(condition=[<($0, 1000)]) LogicalAggregate(group=[{0}], COUNT_VAL=[COUNT()]) LogicalProject(SAL=[$5], $f1=[1]) LogicalFilter(condition=[=($5, ?0)]) LogicalTableScan(table=[[CATALOG, SALES, EMP]])
However, applying CoreRules.FILTER_REDUCE_EXPRESSIONS to the plan it just becomes
LogicalValues(tuples=[[]])
Attachments
Attachments
Issue Links
- is depended upon by
-
CALCITE-4835 Release Calcite 1.28.0
- Closed
- relates to
-
CALCITE-2638 Constant reducer must not duplicate calls to non-deterministic functions
- Closed
- links to