Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ywqzzy committed Feb 8, 2023
1 parent d780b5c commit b51b895
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 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 Expand Up @@ -575,7 +574,7 @@ class FunctionLeastGreatestString : public IFunction
block.getByPosition(result).column = std::move(col_str);
return;
}
}
}
}

private:
Expand Down

0 comments on commit b51b895

Please sign in to comment.