| 77 | end |
| 78 | |
| 79 | def test_options |
| 80 | cast_function = Arrow::Function.find("cast") |
| 81 | args = [ |
| 82 | Arrow::ArrayDatum.new(build_string_array(["1", "2", "-3"])), |
| 83 | ] |
| 84 | options = Arrow::CastOptions.new |
| 85 | options.to_data_type = Arrow::Int8DataType.new |
| 86 | assert_equal(build_int8_array([1, 2, -3]), |
| 87 | cast_function.execute(args, options).value) |
| 88 | end |
| 89 | end |
| 90 | |
| 91 | def test_name |