@@ -1929,7 +1929,7 @@ const char* quote_utf8(gdv_int64 context, const char* in, gdv_int32 in_len,
19291929 // Test multiply overflow for in_len
19301930 if (ARROW_PREDICT_FALSE (
19311931 arrow::internal::MultiplyWithOverflow (2 , in_len, &double_len))) {
1932- gdv_fn_context_set_error_msg (context, " Memory allocation size too large" );
1932+ gdv_fn_context_set_error_msg (context, " Memory allocation size too large. " );
19331933 *out_len = 0 ;
19341934 return " " ;
19351935 }
@@ -2557,9 +2557,6 @@ static inline const char* concat_ws_impl(int64_t context, const char* separator,
25572557 *out_valid = false ;
25582558 return " " ;
25592559 }
2560- if (state.overflow ) {
2561- return handle_overflow_failure (out_valid, out_len);
2562- }
25632560 }
25642561
25652562 // Add separator lengths
@@ -2780,7 +2777,8 @@ const char* elt_int32_utf8_utf8_utf8_utf8_utf8(
27802777FORCE_INLINE
27812778const char * to_hex_binary (int64_t context, const char * text, int32_t text_len,
27822779 int32_t * out_len) {
2783- if (ARROW_PREDICT_FALSE (text_len <= 0 )) {
2780+ if (ARROW_PREDICT_FALSE (text_len < 0 )) {
2781+ gdv_fn_context_set_error_msg (context, " Text length invalid(negative)." );
27842782 *out_len = 0 ;
27852783 return " " ;
27862784 }
@@ -2789,7 +2787,7 @@ const char* to_hex_binary(int64_t context, const char* text, int32_t text_len,
27892787 // Check multiply overflow for text_len
27902788 if (ARROW_PREDICT_FALSE (
27912789 arrow::internal::MultiplyWithOverflow (2 , text_len, &double_len))) {
2792- gdv_fn_context_set_error_msg (context, " Memory allocation size too large" );
2790+ gdv_fn_context_set_error_msg (context, " Memory allocation size too large. " );
27932791 *out_len = 0 ;
27942792 return " " ;
27952793 }
0 commit comments