var-nan commented on issue #49889:
URL: https://github.com/apache/arrow/issues/49889#issuecomment-4483861418
Hi @pitrou , I have fixed the bug and tested the code with some manual test
cases in a main function.
But I'm having some trouble writing the test case for this fix. Below is the
unit test code. The unit test code is crashing (with segmentation fault) in
`ScalarExecutor::EmitResult()` after executing the current span. I'd appreciate
any help.
```cpp
// in scalar_validity_test.cc
TEST_F(TestBooleanValidityKernels, TrueUnlessNullOnREE) {
auto run_ends = ArrayFromJSON(arrow::int32(), "[1, 4, 9, 10]");
auto values = ArrayFromJSON(arrow::int32(), "[1,null,4,null]");
EXPECT_OK_AND_ASSIGN(auto z, RunEndEncodedArray::Make(10, run_ends,
values));
auto expected = ArrayFromJSON(arrow::Boolean(), "[true, null, null, null,
true,true,true,true,true,null]");
CheckScalarUnary("true_unless_null", z, expected);
}
```
--
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]