Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
None
Description
Some user may define some not beautiful mv, but these mv should be worked for rewriting query.
For example:
@Test void testMoreSameExprInMv() { final String mv = "" + "select \"empid\", \"deptno\", sum(\"empid\") as s1, sum(\"empid\") as s2, count(*) as c\n" + "from \"emps\" group by \"empid\", \"deptno\""; final String query = "" + "select sum(\"empid\"), count(*) from \"emps\" group by \"empid\", \"deptno\""; sql(mv, query).ok(); }
I try debug code to solve this problem.
I find some bug in
org.apache.calcite.plan.SubstitutionVisitor#getRexShuttle
PR: https://github.com/apache/calcite/pull/2484
Please review, THX.
Attachments
Attachments
Issue Links
- links to