flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] dawidwys commented on a change in pull request #8062: [FLINK-11884][table] Implement expression resolution on top of new Expressions
Date Mon, 08 Apr 2019 06:43:32 GMT
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message