You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "xiong duan (Jira)" <ji...@apache.org> on 2023/08/15 01:09:00 UTC
[jira] [Created] (CALCITE-5929) Improve LogicalWindow print plan to add the constant value
xiong duan created CALCITE-5929:
-----------------------------------
Summary: Improve LogicalWindow print plan to add the constant value
Key: CALCITE-5929
URL: https://issues.apache.org/jira/browse/CALCITE-5929
Project: Calcite
Issue Type: Improvement
Components: core
Affects Versions: 1.35.0
Reporter: xiong duan
In general, we can extract the original SQL from the plan. But when the SQL includes the LogicalWindow with a constant value, the Plan didn't print it.
The SQL:
{code:java}
select COUNT(*) over (
ORDER BY empno
ROWS BETWEEN 5 + 5 PRECEDING AND 1 PRECEDING) AS w_count from emp{code}
The Plan:
{code:java}
LogicalProject($0=[$1])
LogicalWindow(window#0=[window(order by [0] rows between $1 PRECEDING and $2 PRECEDING aggs [COUNT()])])
LogicalProject(EMPNO=[$0])
LogicalTableScan(table=[[CATALOG, SALES, EMP]]) {code}
In this plan, we don't know the $1 and $2 values.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)