yulei0824 commented on a change in pull request #15110:
URL: https://github.com/apache/flink/pull/15110#discussion_r593114654
##########
File path:
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java
##########
@@ -1108,11 +1109,20 @@ private TableResult executeOperation(Operation
operation) {
return buildShowResult("table name", listTables());
} else if (operation instanceof ShowFunctionsOperation) {
ShowFunctionsOperation showFunctionsOperation =
(ShowFunctionsOperation) operation;
- return buildShowResult(
- "function name",
- showFunctionsOperation.requireUser()
- ? listUserDefinedFunctions()
- : listFunctions());
+ String[] functionNames = null;
+ ShowFunctionsOperation.FunctionScope functionScope =
+ showFunctionsOperation.getFunctionScope();
+ switch (functionScope) {
+ case USER:
+ functionNames = listUserDefinedFunctions();
+ break;
+ case ALL:
+ functionNames = listFunctions();
+ break;
+ default:
+ throw new
UnsupportedFunctionScopeException(functionScope.toString());
Review comment:
Yes
----------------------------------------------------------------
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]