morningman commented on a change in pull request #1823: Add a ALTER operation to change distribution type from RANDOM to HASH URL: https://github.com/apache/incubator-doris/pull/1823#discussion_r325493929
########## File path: fe/src/main/java/org/apache/doris/analysis/ModifyTablePropertiesClause.java ########## @@ -46,31 +39,24 @@ public void analyze(Analyzer analyzer) throws AnalysisException { throw new AnalysisException("Properties is not set"); } - if (properties.size() == 1 && properties.containsKey(KEY_COLOCATE_WITH)) { - if (Config.disable_colocate_join) { - throw new AnalysisException("Colocate table is disabled by Admin"); - } - - if (!Catalog.getCurrentCatalog().getAuth().checkDbPriv( - ConnectContext.get(), ConnectContext.get().getDatabase(), PrivPredicate.ALTER)) { - ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR, - "ALTER"); - } - } else if (!Catalog.getCurrentCatalog().getAuth().checkGlobalPriv(ConnectContext.get(), PrivPredicate.ALTER)) { - ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR, - "ALTER"); + if (properties.size() != 1) { Review comment: Privilege is already checked in AlterStmt, here is redundant ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org