Skip to content

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

@somandal

Description

@somandal

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

Metadata

Metadata

Assignees

Labels

bugmulti-stageRelated to the multi-stage query engine

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions