Timm0 commented on PR #30155: URL: https://github.com/apache/flink/pull/30155#issuecomment-7215391857
> The rewrite looks right to me. It covers SELECT, WITH and set operations, every select item gets the query's output name whether it moves or not, so duplicate names stay aligned too, and the rewritten SQL is validated again when it's expanded. > > [FLINK-41678](https://issues.apache.org/jira/browse/FLINK-41678)'s description says to reject an ordinal `ORDER BY` when a rewrite is needed, but this PR remaps it. I prefer remapping. Could you update the ticket so the two agree? > > Re-running `CREATE OR ALTER` on an MT created before this fix, with a names-only list in non-query order, now emits a `ModifyDefinitionQuery`: the stored query was in query order, the new one is in table order. That starts a new refresh job. It's the intended repair, but it's worth a line in the Jira release note. > > This conflicts textually with [#30156](https://github.com/apache/flink/pull/30156) in `SqlNodeToOperationSqlCreateOrAlterMaterializedTableConverterTest`, so whichever lands second needs a rebase. I updated the ticket, as I prefer remapping as well. Release notes are added to FLINK-41678 and the related FLINK-41611 ticket as well. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
