Returned context to CheckConstraintsBlockOutputStream constructor

This commit is contained in:
Gleb Novikov 2019-05-19 10:19:44 +03:00
parent d1492fc05d
commit 9e6625441c
2 changed files with 4 additions and 2 deletions

View File

@ -19,7 +19,8 @@ public:
CheckConstraintsBlockOutputStream(
const BlockOutputStreamPtr & output_,
const Block & header_,
const ConstraintsDescription & constraints_)
const ConstraintsDescription & constraints_,
const Context & context_)
: output(output_),
header(header_),
constraints(constraints_),

View File

@ -118,7 +118,8 @@ BlockIO InterpreterInsertQuery::execute()
out = std::make_shared<AddingDefaultBlockOutputStream>(
out, query_sample_block, table->getSampleBlock(), table->getColumns().getDefaults(), context);
out = std::make_shared<CheckConstraintsBlockOutputStream>(out, query_sample_block, table->getConstraints());
out = std::make_shared<CheckConstraintsBlockOutputStream>(
out, query_sample_block, table->getConstraints(), context);
auto out_wrapper = std::make_shared<CountingBlockOutputStream>(out);
out_wrapper->setProcessListElement(context.getProcessListElement());