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