[multistage] Investigate why some aliases are removed by Apache Calcite for window functions
- Dominant language
- Java
- Stars
- 6.1k
- Forks
- 1.5k
- Avg merge
- 2d 55m
- Merged PRs (30d)
- 182
Description
For some of the window function queries the aliases are removed. Need to look into why. Opening this ticket to track this work.
E.g.
```
"sql": "EXPLAIN PLAN FOR SELECT a.col1 AS value1, ROW_NUMBER() OVER(ORDER BY a.col2) AS row_number FROM a",
"Execution Plan",
"\nLogicalProject(col1=[$0], $1=[$2])",
"\n LogicalWindow(window#0=[window(order by [1] rows between UNBOUNDED PRECEDING and CURRENT ROW aggs [ROW_NUMBER()])])",
"\n PinotLogicalSortExchange(distribution=[hash], collation=[[1]], isSortOnSender=[false], isSortOnReceiver=[true])",
"\n LogicalProject(col1=[$0], col2=[$1])",
"\n LogicalTableScan(table=[[a]])",
"\n"
```
cc @siddharthteotia
Contributor guide
Assessment
This issue has not been assessed yet.