starocean999 commented on code in PR #60215:
URL: https://github.com/apache/doris/pull/60215#discussion_r2726273199
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowFunctionsCommand.java:
##########
@@ -223,10 +220,12 @@ protected ShowResultSet
handleShowFunctions(ConnectContext ctx, StmtExecutor exe
this.dbName = reAcquireDbName(ctx, dbName);
}
- if (!FunctionUtil.isGlobalFunction(type) &&
!Env.getCurrentEnv().getAccessManager()
- .checkDbPriv(ConnectContext.get(),
InternalCatalog.INTERNAL_CATALOG_NAME, dbName, PrivPredicate.SHOW)) {
-
ErrorReport.reportAnalysisException(ErrorCode.ERR_DBACCESS_DENIED_ERROR,
- ConnectContext.get().getQualifiedUser(), dbName);
+ if (!FunctionUtil.isGlobalFunction(type)) {
Review Comment:
there are lots of duplicate code in new ShowBuiltinFunctionCommand class,
looks like the main problem is privilege checking. So can we fix the privilege
issue in ShowFunctionsCommand, and remove the new ShowBuiltinFunctionCommand
class
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]