Hi
Current we got like this in Window#Group if we wrote SQL like `rows between
0 preceding and 2 following`
$3 PRECEDING
$4 FOLLOWING

$3 and $4 is input ref, and we had to find $3 and $4 in Window#constant,
and all digest about Window#Group doesn't replace the ref back to literal,
so it lost the info:

It's a plan in RelOptRuleTest:

LogicalProject(EMPNO=[$0], DEPTNO=[$1], W_COUNT=[$2])
  LogicalFilter(condition=[IS NULL($2)])
    LogicalWindow(window#0=[window(partition {} order by [] rows
between $2 PRECEDING and $3 PRECEDING aggs [COUNT($0)])])
      LogicalProject(EMPNO=[$0], DEPTNO=[$7])
        LogicalTableScan(table=[[CATALOG, SALES, EMP]])

Regards!

Aron Tao

Reply via email to