YufeiLiu created FLINK-18179: -------------------------------- Summary: Apply AggregateProjectPullUpConstantsRule after WindowPropertiesRules Key: FLINK-18179 URL: https://issues.apache.org/jira/browse/FLINK-18179 Project: Flink Issue Type: Bug Components: Table SQL / Planner Affects Versions: 1.10.1 Reporter: YufeiLiu
When execute sql like this, will throw expection "org.apache.flink.table.planner.codegen.CodeGenException: Unsupported call: TUMBLE_END(TIMESTAMP(3) NOT NULL) If you think this function should be supported, you can create an issue and start a discussion for it." ``` tableEnv.sqlUpdate("CREATE VIEW temp_view AS SELECT '1' AS type, pt FROM source"); tableEnv.sqlUpdate("INSERT INTO sink " + "SELECT " + " type, " + " TUMBLE_END(pt, INTERVAL '5' SECOND) AS end, " + " COUNT(1) " + "FROM " + " temp_view " + "GROUP BY " + " type, " + " TUMBLE(pt, INTERVAL '5' SECOND)"); ``` {{AggregateProjectPullUpConstantsRule}} is apply before {{WindowPropertiesRules}} for now, it will generate a LogicProject node after LogicalWindowAggregate, {{WindowPropertiesRules}} will not match the last LogicProject include auxiliary function. I think put {{AggregateProjectPullUpConstantsRule}} after {{WindowPropertiesRules}} will fix it easily. -- This message was sent by Atlassian Jira (v8.3.4#803005)