Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinyhZou committed Jan 9, 2025
1 parent 5881bc4 commit 06ec1c3
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,18 @@ class FunctionCheckDecimalOverflow : public IFunction
{
ToFieldType result;
bool success = convertToDecimalImpl<FromDataType, ToDataType>(datas[i], precision, scale_from, scale_to, decimal_int_part_max, decimal_int_part_min, result);
vec_to[i] = static_cast<ToFieldType>(result);
(*vec_null_map_to)[i] = !success;
if constexpr (exception_mode == CheckExceptionMode::Null)
{
vec_to[i] = static_cast<ToFieldType>(result);
(*vec_null_map_to)[i] = !success;
}
else
{
if (success)
vec_to[i] = static_cast<ToFieldType>(result);
else
throw Exception(ErrorCodes::DECIMAL_OVERFLOW, "Decimal value is overflow.");
}
}

if constexpr (exception_mode == CheckExceptionMode::Null)
Expand Down

0 comments on commit 06ec1c3

Please sign in to comment.