twalthr commented on a change in pull request #11280: [FLINK-16377][table] 
Support inline user defined functions in expression dsl
URL: https://github.com/apache/flink/pull/11280#discussion_r397242372
 
 

 ##########
 File path: 
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/ApiExpressionUtils.java
 ##########
 @@ -198,4 +204,48 @@ public static boolean isFunction(Expression expression, 
BuiltInFunctionDefinitio
                }
                return false;
        }
+
+       /**
+        * Extracts a {@link FunctionIdentifier} for the given {@link 
CallExpression}. If the call is an inline funcion
+        * ({@link CallExpression#getFunctionIdentifier()} returns empty)
+        * <ul>
+        *     <li>it uses {@link BuiltInFunctionDefinition#getName()} ()} for 
built in functions</li>
+        *     <li>it uses {@link UserDefinedFunction#functionIdentifier()} for 
user defined functions</li>
+        *     <li>it uses {@link FunctionDefinition#toString()} ()} for any 
other functions</li>
 
 Review comment:
   This case should not be supported. Either we are dealing with built-ins or 
user-defined functions.

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