diff --git a/cpp/src/gandiva/precompiled/string_ops_test.cc b/cpp/src/gandiva/precompiled/string_ops_test.cc index 2f82b6be7ce9b..2f8212d8b8d61 100644 --- a/cpp/src/gandiva/precompiled/string_ops_test.cc +++ b/cpp/src/gandiva/precompiled/string_ops_test.cc @@ -887,6 +887,9 @@ TEST(TestGdvFnStubs, TestCastBinaryUtf8) { out = castBINARY_utf8(input, 3, &out_len); EXPECT_EQ(std::string(out, out_len), input); + out = castBINARY_utf8(input, 2, &out_len); + EXPECT_EQ(std::string(out, out_len), "ab"); + out = castBINARY_utf8(input, 1, &out_len); EXPECT_EQ(std::string(out, out_len), "a");