abtom87 commented on code in PR #49813:
URL: https://github.com/apache/arrow/pull/49813#discussion_r3289753445
##########
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:
@kou This was not part of the latest commit or? It would be really great if
the review comments were given all at once, this PR has undergone so many
iterations.
--
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]