Update StorageMaterializedView.cpp

This commit is contained in:
tavplubix 2021-01-21 15:57:18 +03:00 committed by GitHub
parent 6560ec3ed5
commit ac50b1b231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,7 +151,7 @@ void StorageMaterializedView::read(
if (query_plan.isInitialized()) if (query_plan.isInitialized())
{ {
auto mv_header = getHeaderForProcessingStage(*this, column_names, metadata_snapshot, query_info, context, processed_stage); auto mv_header = getHeaderForProcessingStage(*this, column_names, metadata_snapshot, query_info, context, processed_stage);
auto target_header = getHeaderForProcessingStage(*storage, column_names, target_metadata_snapshot, query_info, context, processed_stage); auto target_header = query_plan.getCurrentDataStream().header;
if (!blocksHaveEqualStructure(mv_header, target_header)) if (!blocksHaveEqualStructure(mv_header, target_header))
{ {
auto converting_actions = ActionsDAG::makeConvertingActions(target_header.getColumnsWithTypeAndName(), auto converting_actions = ActionsDAG::makeConvertingActions(target_header.getColumnsWithTypeAndName(),