apache / apache/pinot

[multistage] Investigate why some aliases are removed by Apache Calcite for window functions

Open
#10,682 0 comments 0 reactions 1 assignee Claimed by @somandal View on GitHub
bug multi-stage
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.