Fix FixedString comparison #11393

This commit is contained in:
Alexey Milovidov 2020-06-20 16:13:51 +03:00
parent 1b9e72f9ad
commit 3658ea6e55
3 changed files with 5 additions and 1 deletions

View File

@ -262,7 +262,7 @@ struct StringComparisonImpl
{ {
size_t size = a_data.size(); size_t size = a_data.size();
for (size_t i = 0, j = 0; i < size; i += a_n, ++j) for (size_t i = 0, j = 0; i < size; i += a_n, ++j)
c[j] = Op::apply(0, memcmpSmallLikeZeroPaddedAllowOverflow15(a_data.data() + i, a_n, b_data.data(), b_size)); c[j] = Op::apply(memcmpSmallLikeZeroPaddedAllowOverflow15(a_data.data() + i, a_n, b_data.data(), b_size), 0);
} }
} }

View File

@ -0,0 +1,2 @@
select toFixedString(unhex('202005295555'), 15) > unhex('20200529') r;
select materialize(toFixedString(unhex('202005295555'), 15)) > unhex('20200529') r;