Removed unused method and assertions

This commit is contained in:
Gleb Novikov 2019-06-30 12:09:06 +02:00
parent a146b7383e
commit bb78012cf9

View File

@ -38,26 +38,11 @@ bool CheckConstraintsBlockOutputStream::checkImplMemory(const Block & block, con
{
Block res = block;
constraint->execute(res);
assert(block.columns() == res.columns() - 1);
ColumnWithTypeAndName res_column = res.safeGetByPosition(res.columns() - 1);
auto res_column_uint8 = checkAndGetColumn<ColumnUInt8>(res_column.column.get());
return memoryIsByte(res_column_uint8->getRawDataBegin<1>(), res_column_uint8->byteSize(), 0x1);
}
bool CheckConstraintsBlockOutputStream::checkImplBool(const Block & block, const ExpressionActionsPtr & constraint)
{
Block res = block;
constraint->execute(res);
assert(block.columns() == res.columns() - 1);
ColumnWithTypeAndName res_column = res.safeGetByPosition(res.columns() - 1);
size_t column_size = res_column.column->size();
// std::cerr << "Sizes of constraints: " << res_column.column->size() << ' ' << res_column.column->get << '\n';
for (size_t i = 0; i < column_size; ++i)
if (!res_column.column->getBool(i))
return false;
return true;
}
bool CheckConstraintsBlockOutputStream::checkConstraintOnBlock(const Block & block, const ExpressionActionsPtr & constraint)
{
return checkImplMemory(block, constraint);