mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 21:12:28 +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;
|
Block res = block;
|
||||||
constraint->execute(res);
|
constraint->execute(res);
|
||||||
assert(block.columns() == res.columns() - 1);
|
|
||||||
ColumnWithTypeAndName res_column = res.safeGetByPosition(res.columns() - 1);
|
ColumnWithTypeAndName res_column = res.safeGetByPosition(res.columns() - 1);
|
||||||
auto res_column_uint8 = checkAndGetColumn<ColumnUInt8>(res_column.column.get());
|
auto res_column_uint8 = checkAndGetColumn<ColumnUInt8>(res_column.column.get());
|
||||||
return memoryIsByte(res_column_uint8->getRawDataBegin<1>(), res_column_uint8->byteSize(), 0x1);
|
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)
|
bool CheckConstraintsBlockOutputStream::checkConstraintOnBlock(const Block & block, const ExpressionActionsPtr & constraint)
|
||||||
{
|
{
|
||||||
return checkImplMemory(block, constraint);
|
return checkImplMemory(block, constraint);
|
||||||
|
Loading…
Reference in New Issue
Block a user