diff --git a/src/Interpreters/InterpreterExplainQuery.cpp b/src/Interpreters/InterpreterExplainQuery.cpp index 322b298f181..ad2c77e37a3 100644 --- a/src/Interpreters/InterpreterExplainQuery.cpp +++ b/src/Interpreters/InterpreterExplainQuery.cpp @@ -225,7 +225,7 @@ BlockInputStreamPtr InterpreterExplainQuery::executeImpl() if (ast.getSettings()) throw Exception("Settings are not supported for EXPLAIN AST query.", ErrorCodes::UNKNOWN_SETTING); - dumpAST(ast, ss); + dumpAST(*ast.getExplainedQuery(), ss); } else if (ast.getKind() == ASTExplainQuery::AnalyzedSyntax) {