xiangqiao123 commented on a change in pull request #17761:
URL: https://github.com/apache/flink/pull/17761#discussion_r765630280
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/FunctionCatalog.java
##########
@@ -635,12 +635,12 @@ private void validateAndPrepareFunction(CatalogFunction
function)
// it means it uses the old type inference. We assume that they have
been validated before
// being
// wrapped.
- if (function instanceof InlineCatalogFunction
- && ((InlineCatalogFunction) function).getDefinition()
- instanceof UserDefinedFunction) {
-
- FunctionDefinition definition = ((InlineCatalogFunction)
function).getDefinition();
- UserDefinedFunctionHelper.prepareInstance(config,
(UserDefinedFunction) definition);
+ if (function instanceof InlineCatalogFunction) {
+ // Skip validate if the input is not instance of
UserDefinedFunction.
Review comment:
done
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/FunctionCatalog.java
##########
@@ -635,12 +635,12 @@ private void validateAndPrepareFunction(CatalogFunction
function)
// it means it uses the old type inference. We assume that they have
been validated before
// being
// wrapped.
- if (function instanceof InlineCatalogFunction
- && ((InlineCatalogFunction) function).getDefinition()
- instanceof UserDefinedFunction) {
-
- FunctionDefinition definition = ((InlineCatalogFunction)
function).getDefinition();
- UserDefinedFunctionHelper.prepareInstance(config,
(UserDefinedFunction) definition);
+ if (function instanceof InlineCatalogFunction) {
+ // Skip validate if the input is not instance of
UserDefinedFunction.
+ if (((InlineCatalogFunction) function).getDefinition() instanceof
UserDefinedFunction) {
Review comment:
done
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]