From c8a7596c14b2781e986ec8eed58bb29760786df8 Mon Sep 17 00:00:00 2001 From: liugddx Date: Mon, 26 Feb 2024 10:26:01 +0800 Subject: [PATCH] 1 --- .../java/org/apache/doris/qe/ShowExecutor.java | 17 +++++++++++++++++ 1 file changed, 17 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 f0617f8bdf4c79..ab208415eb1f51 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 @@ -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; @@ -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) { @@ -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> rows = Lists.newArrayList(); + List 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;