dawidwys commented on a change in pull request #8062: [FLINK-11884][table] Implement expression resolution on top of new Expressions URL: https://github.com/apache/flink/pull/8062#discussion_r272902524
########## File path: flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/expressions/PlannerExpressionConverter.scala ########## @@ -71,15 +98,22 @@ class PlannerExpressionConverter private extends ApiExpressionVisitor[PlannerExp val extraNames = args .drop(2) .map(e => getValue[String](e)) - Alias(args.head, name, extraNames) + if (extraNames.nonEmpty) { + TableAlias(args.head, name, extraNames) Review comment: I introduced `TableAlias` to handle naming the fields of result of `TableFunctionCall`. You are right that in 90% of the cases alias should have only one name. The only exception is the mentioned `TableFunctionCall`. If we separate those cases the logic of `Alias` becomes simpler. Right now the validation & resolution of `Alias` introduces an implicit contract that it can not be called for alias with extra names. Besides in a bit longer run we want to get rid of `PlannerExpression`s at all, so this is a temporary solution. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services