Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
Description
Here is a simple case:
select sum(100) over (partition by deptno order by sal) as s -- window1 from emp union all select sum(1000) over(partition by deptno order by sal) as s -- window2 from emp
window1 is different from window2.
But window digest missing constants, the window2 will be replaced by window1 after optimized.
LogicalUnion(all=[true])
LogicalProject($0=[$2])
LogicalWindow(window#0=[window(partition {1} order by [0] aggs [SUM($2)])]) -- window1 digest
LogicalProject(SAL=[$5], DEPTNO=[$7])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
LogicalProject($0=[$2])
LogicalWindow(window#0=[window(partition {1} order by [0] aggs [SUM($2)])]) -- window1 digest
LogicalProject(SAL=[$5], DEPTNO=[$7])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
Attachments
Attachments
Issue Links
- links to