提交 0b43bd53 编写于 作者: N Nikolai Kochetov

fix 01019_materialized_view_select_extra_columns

上级 5a893248
......@@ -68,7 +68,9 @@ PushingToViewsBlockOutputStream::PushingToViewsBlockOutputStream(
/// Insert only columns returned by select.
auto list = std::make_shared<ASTExpressionList>();
for (auto & column : header)
list->children.emplace_back(std::make_shared<ASTIdentifier>(column.name));
/// But skip columns which storage doesn't have.
if (inner_table->hasColumn(column.name))
list->children.emplace_back(std::make_shared<ASTIdentifier>(column.name));
insert->columns = std::move(list);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册