Yulei-Yang commented on code in PR #19242:
URL: https://github.com/apache/doris/pull/19242#discussion_r1186594594
##########
fe/fe-core/src/main/java/org/apache/doris/analysis/ShowPartitionsStmt.java:
##########
@@ -137,8 +151,14 @@ public void analyze(Analyzer analyzer) throws
UserException {
public void analyzeImpl(Analyzer analyzer) throws UserException {
super.analyze(analyzer);
tableName.analyze(analyzer);
- // disallow external catalog
- Util.prohibitExternalCatalog(tableName.getCtl(),
this.getClass().getSimpleName());
+ // disallow unsupported catalog
+ String catalogName = tableName.getCtl();
+ catalog = Env.getCurrentEnv().getCatalogMgr().getCatalog(catalogName);
+ String catalogType = catalog.getType();
+ if (!Strings.isNullOrEmpty(catalogName) &&
!(catalog.isInternalCatalog() || catalogType.equals("hms"))) {
+ throw new AnalysisException(String.format("Catalog of type '%s' is
not allowed in '%s'", catalogType,
+ this.getClass().getSimpleName()));
Review Comment:
fixed
--
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]