hequn8128 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_r272868599
##########
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:
Why do we need the `TableAlias`? From the code, it seems `as` will be
converted into a TableAlias if the extraNames are not empty. However, a table
can only contain one column, i.e., the extra name can be empty.
Perhaps use `Alias` is enough? What do you think?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services