diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 3af128ffb00..eeee2df200c 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -996,7 +996,7 @@ void InterpreterSelectQuery::executeFetchColumns( argument_types[j] = header.getByName(desc->argument_names[j]).type; Block block_with_count{ - {nullptr, std::make_shared(func, argument_types, desc->parameters), desc->column_name}}; + {ColumnPtr(column->cloneEmpty()), std::make_shared(func, argument_types, desc->parameters), desc->column_name}}; Chunk chunk(Columns(), column->size()); chunk.addColumn(std::move(column));