| 1105 | |
| 1106 | #ifdef ARROW_COMPUTE |
| 1107 | Result<std::shared_ptr<Array>> REEFromJSON(const std::shared_ptr<DataType>& ree_type, |
| 1108 | const std::string& json) { |
| 1109 | auto ree_type_ptr = checked_cast<const RunEndEncodedType*>(ree_type.get()); |
| 1110 | auto array = ArrayFromJSON(ree_type_ptr->value_type(), json); |
| 1111 | ARROW_ASSIGN_OR_RAISE( |
| 1112 | auto datum, |
| 1113 | RunEndEncode(array, compute::RunEndEncodeOptions{ree_type_ptr->run_end_type()})); |
| 1114 | return datum.make_array(); |
| 1115 | } |
| 1116 | |
| 1117 | TEST_F(TestArrayExport, RunEndEncoded) { |
| 1118 | auto factory = []() { |
no test coverage detected