Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
Description
Now, SubstitutionVisitor support `Query with distinct aggregate on the column is matched to the group list existing in target`, as CALCITE-4374 describes.
But. It's fail, when query aggregate with max/min based on the column, which is in the group by list of target.
Materialized view recognition should also success.
//代码占位符 @Test void testQueryNoDistinctOptionalityAggCallColInTargetGroupBy1() { final String mv = "" + "select \"name\", \"deptno\" " + "from \"emps\" group by \"name\", \"deptno\""; final String query = "" + "select \"name\", min(\"deptno\")\n" + "from \"emps\" group by \"name\""; sql(mv, query).ok(); }
Attachments
Attachments
Issue Links
- relates to
-
CALCITE-4374 Support materialized view recognition when query distinct aggregate on target GROUP BY column
-
- Closed
-
- links to