Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/2961#discussion_r91691224 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/table.scala --- @@ -881,24 +883,21 @@ class GroupWindowedTable( * }}} */ def select(fields: Expression*): Table = { --- End diff -- Watermarks and timestamps should not be affected by this change. They are treated as metadata by Flink and not part of the schema. Also watermarks and timestamps should be assigned before the query. We do not support assigning watermarks within a query. I also had a quick look into it. One problem I found was that a window alias is handled as an `UnresolvedFieldReference` in `select` here and therefore added to the projection. However, the input does to have a field like that and validation fails. During validation, the window alias is correctly recognized. Maybe it makes more sense to add the projection at this point by injection an additional `Project` with the `RelBuilder`. Another solution could be a `RelOptRule`.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---