You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Jiajun Xie (Jira)" <ji...@apache.org> on 2024/10/17 02:46:00 UTC
[jira] [Created] (CALCITE-6632) Wrong optimization because window missing constants in digest
Jiajun Xie created CALCITE-6632:
-----------------------------------
Summary: 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!
Reporter: Jiajun Xie
Assignee: Jiajun Xie
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)