JING ZHANG created FLINK-23638:
----------------------------------
Summary: Field names are not kept after apply
ProjectToWindowRule#ProjectToLogicalProjectAndWindowRule
Key: FLINK-23638
URL: https://issues.apache.org/jira/browse/FLINK-23638
Project: Flink
Issue Type: Bug
Components: Table SQL / Planner
Reporter: JING ZHANG
After apply ProjectToWindowRule#ProjectToLogicalProjectAndWindowRule, field
names are not kept.
{code:java}
//代码占位符
SELECT *
FROM (
SELECT *,
ROW_NUMBER() OVER (PARTITION BY a ORDER BY PROCTIME() ASC) as rowNum
FROM MyTable
)
WHERE rowNum = 1
{code}
Before apply ProjectToWindowRule#ProjectToLogicalProjectAndWindowRule, field
names of is input node are (a,b,c,proctime,rowtime,rowNum). After apply the
rule, field names of equivalent renode are (a,b,c,protime,rowtime,$5).
Currently, calcite does not guarantee to preserve field names when planner
rules are applied (please see CALCITE-2718). But kept field names is important
for Flink because the field names are visible to front end user of Flink SQL
job.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)