mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-01 03:52:15 +00:00
Removed unused method and assertions
This commit is contained in:
parent
a146b7383e
commit
bb78012cf9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user