From b5c9be75c4b4784656965da2acc29e479b396a4c Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Mon, 12 Aug 2019 21:00:41 +0300 Subject: [PATCH] Materialize constant keys in header. --- dbms/src/Interpreters/InterpreterSelectQuery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/Interpreters/InterpreterSelectQuery.cpp b/dbms/src/Interpreters/InterpreterSelectQuery.cpp index 2f51b596721..8e01d9b5209 100644 --- a/dbms/src/Interpreters/InterpreterSelectQuery.cpp +++ b/dbms/src/Interpreters/InterpreterSelectQuery.cpp @@ -452,7 +452,7 @@ Block InterpreterSelectQuery::getSampleBlockImpl() Block res; for (auto & key : key_names) - res.insert(header.getByName(key).cloneEmpty()); + res.insert({nullptr, header.getByName(key).type, key}); for (auto & aggregate : aggregates) {