[ 
https://issues.apache.org/jira/browse/CALCITE-6632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jiajun Xie updated CALCITE-6632:
--------------------------------
    Environment: !image-2024-10-17-10-41-11-032.png|width=482,height=203!  
(was: !image-2024-10-17-10-41-11-032.png!)

> Wrong optimization because window missing constants in digest
> -------------------------------------------------------------
>
>                 Key: CALCITE-6632
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6632
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>         Environment: !image-2024-10-17-10-41-11-032.png|width=482,height=203!
>            Reporter: Jiajun Xie
>            Assignee: Jiajun Xie
>            Priority: Major
>         Attachments: image-2024-10-17-10-41-11-032.png
>
>
> Here is a simple case:
> {code:java}
> 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 {code}
> window1 is different from window2.
> But window digest missing constants, the window2 will be replaced by window1 
> after optimized.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to