You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/12/13 14:33:17 UTC

[GitHub] [flink] twalthr commented on a change in pull request #10519: [FLINK-12283][table] Relax UDF constraints by using the ClosureCleaner

twalthr commented on a change in pull request #10519: [FLINK-12283][table] Relax UDF constraints by using the ClosureCleaner
URL: https://github.com/apache/flink/pull/10519#discussion_r357672563
 
 

 ##########
 File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ResolveCallByArgumentsRule.java
 ##########
 @@ -220,6 +227,43 @@ private ResolvedExpression runLegacyTypeInference(
 				})
 				.collect(Collectors.toList());
 		}
+
+		/**
+		 * Validates and cleans an inline, unregistered {@link UserDefinedFunction}.
+		 */
+		private FunctionDefinition prepareUserDefinedFunction(FunctionDefinition definition) {
+			if (definition instanceof ScalarFunctionDefinition) {
+				final ScalarFunctionDefinition sf = (ScalarFunctionDefinition) definition;
+				UserDefinedFunctionHelper.prepareFunction(resolutionContext.configuration(), sf.getScalarFunction());
+				return new ScalarFunctionDefinition(
 
 Review comment:
   This method is just a temporary solution until FLIP-65 is implemented. In the future, we don't need to store the type next to the function but the function provides a strategy for determining the type.

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