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

Yu Xu resolved CALCITE-5929.
----------------------------
    Fix Version/s: 1.43.0
       Resolution: Fixed

Fixed in 
[f541bf3|https://github.com/apache/calcite/commit/f541bf3319e00cc7eb61a8b5e4b3e6b49a6177b0]

Thank you for report the issue. [~nobigo] 

Thank you for the review [~mbudiu] [~jensen] 

> 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
>            Assignee: Yu Xu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.43.0
>
>
> 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)

Reply via email to