mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 21:42:39 +00:00
Inline compareAt
This commit is contained in:
parent
9e42da4966
commit
84f51b9c5a
@ -14,17 +14,12 @@ namespace DB
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
bool isEqual(const IColumn & column, size_t lhs, size_t rhs)
|
|
||||||
{
|
|
||||||
return column.compareAt(lhs, rhs, column, 1) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isEqual(const Block & block, const SortDescription & description, size_t lhs, size_t rhs)
|
bool isEqual(const Block & block, const SortDescription & description, size_t lhs, size_t rhs)
|
||||||
{
|
{
|
||||||
for (const auto & column_description : description)
|
for (const auto & column_description : description)
|
||||||
{
|
{
|
||||||
const auto & column = *block.getByName(column_description.column_name).column;
|
const auto & column = *block.getByName(column_description.column_name).column;
|
||||||
if (!isEqual(column, lhs, rhs))
|
if (column.compareAt(lhs, rhs, column, 1) != 0)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user