[improvement](meta) sort result by tablename when show table status like 'show data' (#11885)

This commit is contained in:
xueweizhang
2022-08-18 14:23:45 +08:00
committed by GitHub
parent d505d1a5ae
commit 4c3f72d019
2 changed files with 5 additions and 1 deletions

View File

@ -4050,7 +4050,7 @@ public class Env {
// set table's default replication number.
Map<String, String> tblProperties = Maps.newHashMap();
tblProperties.put("default.replication_allocation", replicaAlloc.toCreateStmt());
tblProperties.put("default." + PropertyAnalyzer.PROPERTIES_REPLICATION_ALLOCATION, replicaAlloc.toCreateStmt());
table.setReplicaAllocation(tblProperties);
// log

View File

@ -800,6 +800,10 @@ public class ShowExecutor {
rows.add(row);
}
}
// sort by table name
rows.sort((x, y) -> {
return x.get(0).compareTo(y.get(0));
});
resultSet = new ShowResultSet(showStmt.getMetaData(), rows);
}