Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/explain/statements.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion parser/testdata/02902_show_databases_limit/metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"todo": true}
{}