mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 16:50:48 +00:00
Proper check order
This commit is contained in:
parent
99f3ac5a0c
commit
c1d52b9771
@ -78,7 +78,7 @@ std::optional<size_t> SingleValueDataBase::getSmallestIndexNotNullIf(
|
||||
const IColumn & column, const UInt8 * __restrict null_map, const UInt8 * __restrict if_map, size_t row_begin, size_t row_end)
|
||||
{
|
||||
size_t index = row_begin;
|
||||
while (((if_map && if_map[index] == 0) || (null_map && null_map[index] != 0)) && (index < row_end))
|
||||
while ((index < row_end) && ((if_map && if_map[index] == 0) || (null_map && null_map[index] != 0)))
|
||||
index++;
|
||||
if (index >= row_end)
|
||||
return std::nullopt;
|
||||
@ -93,7 +93,7 @@ std::optional<size_t> SingleValueDataBase::getGreatestIndexNotNullIf(
|
||||
const IColumn & column, const UInt8 * __restrict null_map, const UInt8 * __restrict if_map, size_t row_begin, size_t row_end)
|
||||
{
|
||||
size_t index = row_begin;
|
||||
while (((if_map && if_map[index] == 0) || (null_map && null_map[index] != 0)) && (index < row_end))
|
||||
while ((index < row_end) && ((if_map && if_map[index] == 0) || (null_map && null_map[index] != 0)))
|
||||
index++;
|
||||
if (index >= row_end)
|
||||
return std::nullopt;
|
||||
@ -240,7 +240,7 @@ void SingleValueDataFixed<T>::setSmallestNotNullIf(
|
||||
else
|
||||
{
|
||||
size_t index = row_begin;
|
||||
while (((if_map && if_map[index] == 0) || (null_map && null_map[index] != 0)) && (index < row_end))
|
||||
while ((index < row_end) && ((if_map && if_map[index] == 0) || (null_map && null_map[index] != 0)))
|
||||
index++;
|
||||
if (index >= row_end)
|
||||
return;
|
||||
@ -284,7 +284,7 @@ void SingleValueDataFixed<T>::setGreatestNotNullIf(
|
||||
else
|
||||
{
|
||||
size_t index = row_begin;
|
||||
while (((if_map && if_map[index] == 0) || (null_map && null_map[index] != 0)) && (index < row_end))
|
||||
while ((index < row_end) && ((if_map && if_map[index] == 0) || (null_map && null_map[index] != 0)))
|
||||
index++;
|
||||
if (index >= row_end)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user