This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-1.1-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.1-lts by this push:
new ccef9d5267 [Enhancement](meta) sort result by tablename when show
tables like show data (#11638) (#14492)
ccef9d5267 is described below
commit ccef9d52678acaf1dbad3f44ce81991b3ac3aa56
Author: xueweizhang <[email protected]>
AuthorDate: Tue Nov 22 18:59:23 2022 +0800
[Enhancement](meta) sort result by tablename when show tables like show
data (#11638) (#14492)
* [improvement] sort result by tablename when show tables like 'show data'
---
fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java
index 8e4647d67d..8a1c89bf1d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java
@@ -701,6 +701,11 @@ public class ShowExecutor {
rows.add(Lists.newArrayList(tbl.getName()));
}
}
+ // sort by table name
+ rows.sort((x, y) -> {
+ return x.get(0).compareTo(y.get(0));
+ });
+
resultSet = new ShowResultSet(showTableStmt.getMetaData(), rows);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]