abtom87 commented on code in PR #49813:
URL: https://github.com/apache/arrow/pull/49813#discussion_r3133111027


##########
cpp/src/gandiva/precompiled/string_ops.cc:
##########
@@ -2459,16 +2467,47 @@ const char* concat_ws_utf8_utf8(int64_t context, const 
char* separator,
     return "";
   }
 
+  int32_t temp = 0;

Review Comment:
   Yes, they have been handled, as well. Perhaps a better way might be to 
approach them using variadic template or so.



##########
cpp/src/gandiva/precompiled/string_ops_test.cc:
##########
@@ -1165,6 +1165,11 @@ TEST(TestStringOps, TestQuote) {
   out_str = quote_utf8(ctx_ptr, "'''''''''", 9, &out_len);
   EXPECT_EQ(std::string(out_str, out_len), "'\\'\\'\\'\\'\\'\\'\\'\\'\\''");
   EXPECT_FALSE(ctx.has_error());
+
+  int32_t bad_in_len = std::numeric_limits<int32_t>::max() / 2 + 20;

Review Comment:
   I believe that worked, I can try adding that too. What did not work though 
is (max/2) -1. The logic should allocate that memory, but i got a segfault, 
probably because the size was too huge.
   
   Edit: added.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to