Removed context from CheckConstraintsBlockOutputStream

This commit is contained in:
Gleb Novikov 2019-05-19 10:17:06 +03:00
parent 773849a43d
commit d1492fc05d
2 changed files with 3 additions and 7 deletions

View File

@ -19,13 +19,11 @@ public:
CheckConstraintsBlockOutputStream(
const BlockOutputStreamPtr & output_,
const Block & header_,
const ConstraintsDescription & constraints_,
const Context & context_)
const ConstraintsDescription & constraints_)
: output(output_),
header(header_),
constraints(constraints_),
expressions(constraints_.getExpressions(context_, header.getNamesAndTypesList())),
context(context_)
expressions(constraints_.getExpressions(context_, header.getNamesAndTypesList()))
{ }
Block getHeader() const override { return header; }
@ -43,6 +41,5 @@ private:
Block header;
const ConstraintsDescription constraints;
const ConstraintsExpressions expressions;
const Context & context;
};
}

View File

@ -118,8 +118,7 @@ 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(), context);
out = std::make_shared<CheckConstraintsBlockOutputStream>(out, query_sample_block, table->getConstraints());
auto out_wrapper = std::make_shared<CountingBlockOutputStream>(out);
out_wrapper->setProcessListElement(context.getProcessListElement());