Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
liugddx committed Feb 26, 2024
1 parent 9ec4224 commit c8a7596
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.apache.doris.analysis.ShowBuildIndexStmt;
import org.apache.doris.analysis.ShowCatalogRecycleBinStmt;
import org.apache.doris.analysis.ShowCatalogStmt;
import org.apache.doris.analysis.ShowCharsetStmt;
import org.apache.doris.analysis.ShowCollationStmt;
import org.apache.doris.analysis.ShowColumnHistStmt;
import org.apache.doris.analysis.ShowColumnStatsStmt;
Expand Down Expand Up @@ -339,6 +340,8 @@ public ShowResultSet execute() throws AnalysisException {
handleShowData();
} else if (stmt instanceof ShowQueryStatsStmt) {
handleShowQueryStats();
} else if (stmt instanceof ShowCharsetStmt) {
handleShowCharset();
} else if (stmt instanceof ShowCollationStmt) {
handleShowCollation();
} else if (stmt instanceof ShowPartitionsStmt) {
Expand Down Expand Up @@ -1653,6 +1656,20 @@ private void handleShowAlter() throws AnalysisException {
resultSet = new ShowResultSet(showStmt.getMetaData(), rows);
}

// Show character set.
private void handleShowCharset() throws AnalysisException {
ShowCharsetStmt showStmt = (ShowCharsetStmt) stmt;
List<List<String>> rows = Lists.newArrayList();
List<String> row = Lists.newArrayList();
// | utf8mb4 | UTF-8 Unicode | utf8mb4_general_ci | 4|
row.add("utf8mb4");
row.add("UTF-8 Unicode");
row.add("utf8mb4_general_ci");
row.add("4");
rows.add(row);
resultSet = new ShowResultSet(showStmt.getMetaData(), rows);
}

// Show alter statement.
private void handleShowCollation() throws AnalysisException {
ShowCollationStmt showStmt = (ShowCollationStmt) stmt;
Expand Down

0 comments on commit c8a7596

Please sign in to comment.