Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
If we have query and materialized view as below:
query: LogicalAggregate(group=[{4}], agg#0=[COUNT($3)]) LogicalProject(EMPNO=[$0], ENAME=[$1], JOB=[$2], SAL=[$5], DEPTNO=[$7]) LogicalTableScan(table=[[scott, EMP]]) mv logic: LogicalAggregate(group=[{1}], agg#0=[COUNT($0)]) LogicalProject(SAL=[$5], DEPTNO=[$7]) LogicalTableScan(table=[[scott, EMP]])
The semantics of query and mv logic are the same. Materialized view matching failed, because field trimming is not done when canonicalizing the plans.
Currently Calcite does field trimming when convert sql to rel. But my company's internal system does materialization detection – – generates & transforms & stores the RelNode.
Shall we add the field trimming when canonicalizing materialized view logic?
Attachments
Issue Links
- links to