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


##########
cpp/src/gandiva/precompiled/string_ops_test.cc:
##########
@@ -2298,11 +2318,42 @@ TEST(TestStringOps, TestConcatWs) {
   EXPECT_EQ(std::string(out, out_len), "hey");
   EXPECT_EQ(out_result, true);
 
+  // Max word1 len
+  out = concat_ws_utf8_utf8(ctx_ptr, separator, sep_len, true, word1,
+                            std::numeric_limits<int32_t>::max(), true, word2, 
word2_len,
+                            true, &out_result, &out_len);
+  EXPECT_STREQ(out, "");
+  EXPECT_EQ(out_len, 0);
+  EXPECT_EQ(out_result, false);
+
+  // Max word2 len
+  out = concat_ws_utf8_utf8(ctx_ptr, separator, sep_len, true, word1, 
word1_len, true,
+                            word2, std::numeric_limits<int32_t>::max(), true, 
&out_result,
+                            &out_len);
+  EXPECT_STREQ(out, "");
+  EXPECT_EQ(out_len, 0);
+  EXPECT_EQ(out_result, false);
+
+  // Max separator len
+  out = concat_ws_utf8_utf8(ctx_ptr, separator, 
std::numeric_limits<int32_t>::max(), true,
+                            word1, word1_len, true, word2, word2_len, true, 
&out_result,
+                            &out_len);
+  EXPECT_STREQ(out, "");
+  EXPECT_EQ(out_len, 0);
+  EXPECT_EQ(out_result, false);
+
   separator = "#";
   sep_len = static_cast<int32_t>(strlen(separator));
   const char* word3 = "wow";
   int32_t word3_len = static_cast<int32_t>(strlen(word3));
 
+  out = concat_ws_utf8_utf8_utf8(ctx_ptr, separator, 
std::numeric_limits<int32_t>::max(),
+                                 true, word1, word1_len, true, word2, 
word2_len, true,
+                                 word3, word3_len, true, &out_result, 
&out_len);
+  EXPECT_STREQ(out, "");
+  EXPECT_EQ(out_len, 0);
+  EXPECT_EQ(out_result, false);
+

Review Comment:
   Sorry for bothering you.
   
   I'm not sure how GitHub Copilot works because GitHub Copilot isn't open 
source software.
   
   GH-50023 will trigger GitHub Copilot review automatically by your push. It 
may not add all comments at once but you don't need to wait for my manual 
GitHub Copilot review trigger.
   
   In general, we can merge smaller PRs quickly than one larger PR. Could you 
try splitting smaller PRs like you did (#49973) next time?



-- 
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