提交 9c685842 编写于 作者: A Alexey Milovidov

Fixed error #1947

上级 63467dbc
......@@ -78,6 +78,7 @@ public:
bool isFixedAndContiguous() const override { return false; }
bool valuesHaveFixedSize() const override { return nested_column->valuesHaveFixedSize(); }
size_t sizeOfValueIfFixed() const override { return null_map->sizeOfValueIfFixed() + nested_column->sizeOfValueIfFixed(); }
bool onlyNull() const override { return nested_column->isDummy(); }
/// Return the column that represents values.
......
......@@ -6,6 +6,8 @@
#include <Storages/StorageView.h>
#include <Storages/StorageFactory.h>
#include <DataStreams/MaterializingBlockInputStream.h>
namespace DB
{
......@@ -43,7 +45,14 @@ BlockInputStreams StorageView::read(
const unsigned /*num_streams*/)
{
processed_stage = QueryProcessingStage::FetchColumns;
return InterpreterSelectWithUnionQuery(inner_query->clone(), context, column_names).executeWithMultipleStreams();
BlockInputStreams res = InterpreterSelectWithUnionQuery(inner_query->clone(), context, column_names).executeWithMultipleStreams();
/// It's expected that the columns read from storage are not constant.
/// Because method 'getSampleBlockForColumns' is used to obtain a structure of result in InterpreterSelectQuery.
for (auto & stream : res)
stream = std::make_shared<MaterializingBlockInputStream>(stream);
return res;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册