| 1083 | |
| 1084 | #ifdef ARROW_COMPUTE |
| 1085 | Result<std::shared_ptr<Array>> REEFromJSON(const std::shared_ptr<DataType>& ree_type, |
| 1086 | const std::string& json) { |
| 1087 | auto ree_type_ptr = checked_cast<const RunEndEncodedType*>(ree_type.get()); |
| 1088 | auto array = ArrayFromJSON(ree_type_ptr->value_type(), json); |
| 1089 | ARROW_ASSIGN_OR_RAISE( |
| 1090 | auto datum, |
| 1091 | RunEndEncode(array, compute::RunEndEncodeOptions{ree_type_ptr->run_end_type()})); |
| 1092 | return datum.make_array(); |
| 1093 | } |
| 1094 | |
| 1095 | TEST_F(TestArrayExport, RunEndEncoded) { |
| 1096 | auto factory = []() { |
no test coverage detected