From 18e4df1e853470a614e110f30f375c4ecf8c0fce Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Thu, 30 Apr 2020 19:30:41 +0300 Subject: [PATCH] Create local context for query analyzing in PushingToViewsBlockOutputStream. --- src/DataStreams/PushingToViewsBlockOutputStream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DataStreams/PushingToViewsBlockOutputStream.cpp b/src/DataStreams/PushingToViewsBlockOutputStream.cpp index 9a442b536aa..7fd90919410 100644 --- a/src/DataStreams/PushingToViewsBlockOutputStream.cpp +++ b/src/DataStreams/PushingToViewsBlockOutputStream.cpp @@ -69,7 +69,7 @@ PushingToViewsBlockOutputStream::PushingToViewsBlockOutputStream( Context local_context = *views_context; local_context.addViewSource( StorageValues::create( - storage->getStorageID(), storage->getColumns(), Block(), storage->getVirtuals())); + storage->getStorageID(), storage->getColumns(), storage->getSampleBlock(), storage->getVirtuals())); /// Get list of columns we get from select query. auto header = InterpreterSelectQuery(query, local_context, SelectQueryOptions().analyze()).getSampleBlock();