Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
When query distinct aggregate on the column, which is in the group by list of target.
Materialized view recognition should success.
See this case.
@Test void testQueryDistinctColumnInTargetGroupByList() { final String mv = "" + "select \"name\", \"deptno\" " + "from \"emps\" group by \"name\", \"deptno\""; final String query = "" + "select \"name\", count(distinct \"deptno\")\n" + "from \"emps\" group by \"name\""; sql(mv, query).ok(); }
Attachments
Issue Links
- is related to
-
CALCITE-4817 Expand SubstitutionVisitor of Aggregate with max/min, which column is the group by list of target
-
- Closed
-
- links to