dawidwys commented on a change in pull request #8822: [FLINK-12899][table] 
Introduce a resolved expression with data type
URL: https://github.com/apache/flink/pull/8822#discussion_r296138765
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/LookupCallResolver.java
 ##########
 @@ -43,20 +41,21 @@ public Expression visit(LookupCallExpression lookupCall) {
                final FunctionLookup.Result result = 
functionLookup.lookupFunction(lookupCall.getUnresolvedName())
                        .orElseThrow(() -> new ValidationException("Undefined 
function: " + lookupCall.getUnresolvedName()));
 
-               return createResolvedCall(result.getFunctionDefinition(), 
lookupCall.getChildren());
+               return new UnresolvedCallExpression(
+                       result.getObjectIdentifier(),
+                       result.getFunctionDefinition(),
+                       resolveChildren(lookupCall.getChildren()));
        }
 
        public Expression visit(UnresolvedCallExpression unresolvedCall) {
-               return 
createResolvedCall(unresolvedCall.getFunctionDefinition(), 
unresolvedCall.getChildren());
+               return 
unresolvedCall.replaceArgs(resolveChildren(unresolvedCall.getChildren()));
        }
 
-       private Expression createResolvedCall(FunctionDefinition 
functionDefinition, List<Expression> unresolvedChildren) {
-               final Expression[] resolvedChildren = unresolvedChildren
+       private List<Expression> resolveChildren(List<Expression> 
unresolvedChildren) {
 
 Review comment:
   nit: `lookupChildren`

----------------------------------------------------------------
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

Reply via email to