mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Update InterpreterInsertQuery.cpp
This commit is contained in:
parent
5c03df2f1c
commit
9bcd93d959
@ -161,7 +161,7 @@ Block InterpreterInsertQuery::getSampleBlock(
|
|||||||
if (table_sample_physical.has(current_name))
|
if (table_sample_physical.has(current_name))
|
||||||
{
|
{
|
||||||
if (!allow_materialized)
|
if (!allow_materialized)
|
||||||
throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert column {}, because it is a MATERIALIZED column",
|
throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert column {}, because it is MATERIALIZED column.",
|
||||||
current_name);
|
current_name);
|
||||||
res.insert(ColumnWithTypeAndName(table_sample_physical.getByName(current_name).type, current_name));
|
res.insert(ColumnWithTypeAndName(table_sample_physical.getByName(current_name).type, current_name));
|
||||||
}
|
}
|
||||||
@ -527,7 +527,7 @@ BlockIO InterpreterInsertQuery::execute()
|
|||||||
{
|
{
|
||||||
for (const auto & column : metadata_snapshot->getColumns())
|
for (const auto & column : metadata_snapshot->getColumns())
|
||||||
if (column.default_desc.kind == ColumnDefaultKind::Materialized && header.has(column.name))
|
if (column.default_desc.kind == ColumnDefaultKind::Materialized && header.has(column.name))
|
||||||
throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert column {}, because it is a MATERIALIZED column", column.name);
|
throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Cannot insert column {}, because it is MATERIALIZED column.", column.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
res.pipeline = QueryPipelineBuilder::getPipeline(std::move(pipeline));
|
res.pipeline = QueryPipelineBuilder::getPipeline(std::move(pipeline));
|
||||||
|
Loading…
Reference in New Issue
Block a user