| 37 | end |
| 38 | |
| 39 | def test_chunked_array |
| 40 | or_function = Arrow::Function.find("or") |
| 41 | chunked_arrays = [ |
| 42 | Arrow::ChunkedArray.new([ |
| 43 | build_boolean_array([true]), |
| 44 | build_boolean_array([false, false]), |
| 45 | ]), |
| 46 | Arrow::ChunkedArray.new([ |
| 47 | build_boolean_array([true, false]), |
| 48 | build_boolean_array([true]), |
| 49 | ]), |
| 50 | ] |
| 51 | args = chunked_arrays.collect do |chunked_array| |
| 52 | Arrow::ChunkedArrayDatum.new(chunked_array) |
| 53 | end |
| 54 | expected_array = build_boolean_array([true, false, true]) |
| 55 | expected = Arrow::ChunkedArray.new([expected_array]) |
| 56 | assert_equal(expected, |
| 57 | or_function.execute(args).value) |
| 58 | end |
| 59 | |
| 60 | def test_input_scalar |
| 61 | add_function = Arrow::Function.find("add") |