Fix msan test.

This commit is contained in:
Nikolai Kochetov 2020-06-18 16:43:29 +03:00
parent c111836ada
commit 4ec8012e27

View File

@ -79,7 +79,16 @@ void IColumn::compareImpl(const Derived & rhs, size_t rhs_row_num,
if constexpr (use_indexes)
row = indexes[i];
compare_results[row] = compareAt(row, rhs_row_num, rhs, nan_direction_hint);
int res = compareAt(row, rhs_row_num, rhs, nan_direction_hint);
/// We need to convert int to Int8. Sometimes comparison return values which do not fit in one byte.
if (res < 0)
compare_results[row] = -1;
else if (res > 0)
compare_results[row] = 1;
else
compare_results[row] = 0;
if constexpr (reversed)
compare_results[row] = -compare_results[row];