Skip to content

Commit

Permalink
Update dbms/src/Functions/LeastGreatest.h
Browse files Browse the repository at this point in the history
Co-authored-by: Liqi Geng <[email protected]>
  • Loading branch information
ywqzzy and gengliqi authored Feb 8, 2023
1 parent 2ccea27 commit 3931557
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dbms/src/Functions/LeastGreatest.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,10 @@ struct LeastGreatestStringImpl
}
else if (res == 0)
{
size_t size = std::max(a_size, b_size);
if (a_size > b_size)
res_ref[i] = StringRef(&a_data[0], size);
res_ref[i] = StringRef(&a_data[0], a_size);
else
res_ref[i] = StringRef(&b_data[0], size);
res_ref[i] = StringRef(&b_data[0], b_size);
}
else
{
Expand Down

0 comments on commit 3931557

Please sign in to comment.