diff --git a/internal/explain/statements.go b/internal/explain/statements.go index 9722a3ab2..441938005 100644 --- a/internal/explain/statements.go +++ b/internal/explain/statements.go @@ -318,8 +318,8 @@ func explainExplainQuery(sb *strings.Builder, n *ast.ExplainQuery, indent string func explainShowQuery(sb *strings.Builder, n *ast.ShowQuery, indent string) { // ClickHouse maps certain SHOW types to ShowTables in EXPLAIN AST showType := strings.Title(strings.ToLower(string(n.ShowType))) - // SHOW SETTINGS is displayed as ShowTables in ClickHouse - if showType == "Settings" { + // SHOW SETTINGS and SHOW DATABASES are displayed as ShowTables in ClickHouse + if showType == "Settings" || showType == "Databases" { showType = "Tables" } fmt.Fprintf(sb, "%sShow%s\n", indent, showType) diff --git a/parser/testdata/02902_show_databases_limit/metadata.json b/parser/testdata/02902_show_databases_limit/metadata.json index ef120d978..9e26dfeeb 100644 --- a/parser/testdata/02902_show_databases_limit/metadata.json +++ b/parser/testdata/02902_show_databases_limit/metadata.json @@ -1 +1 @@ -{"todo": true} +{} \ No newline at end of file