Skip to content

Commit

Permalink
[BugFix] Fix show keys from support external catalog (backport #52977) (
Browse files Browse the repository at this point in the history
#53066)

Signed-off-by: Astralidea <[email protected]>
  • Loading branch information
Astralidea authored Nov 20, 2024
1 parent 406dc4d commit f04c818
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fe/fe-core/src/main/java/com/starrocks/qe/ShowExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -2159,7 +2159,11 @@ public ShowResultSet visitShowDynamicPartitionStatement(ShowDynamicPartitionStmt
@Override
public ShowResultSet visitShowIndexStatement(ShowIndexStmt statement, ConnectContext context) {
List<List<String>> rows = Lists.newArrayList();
Database db = context.getGlobalStateMgr().getDb(statement.getDbName());
String catalogName = statement.getTableName().getCatalog();
if (catalogName == null) {
catalogName = context.getCurrentCatalog();
}
Database db = GlobalStateMgr.getCurrentState().getMetadataMgr().getDb(catalogName, statement.getDbName());
MetaUtils.checkDbNullAndReport(db, statement.getDbName());
Table table = MetaUtils.getSessionAwareTable(context, db, statement.getTableName());
if (table == null) {
Expand Down

0 comments on commit f04c818

Please sign in to comment.