twalthr commented on a change in pull request #13007:
URL: https://github.com/apache/flink/pull/13007#discussion_r462115094
##########
File path:
flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/catalog/FunctionCatalogOperatorTable.java
##########
@@ -206,10 +205,13 @@ private boolean verifyFunctionKind(
return false;
}
- // it would be nice to give a more meaningful exception when a
scalar function is used instead
- // of a table function and vice versa, but we can do that only
once FLIP-51 is implemented
+ final FunctionKind kind = definition.getKind();
- if (definition.getKind() == FunctionKind.SCALAR) {
+ if (kind == FunctionKind.TABLE) {
Review comment:
I added a JavaDoc to this method. It basically verifies which kinds of
functions are allowed to be returned from the catalog given the context
information. `SqlFunctionCategory` can help for checking but is not always
helpful. In any case non user-defined functions or `FunctionKind.OTHER` are
definitely not supported at this location.
----------------------------------------------------------------
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]