| 1124 | } |
| 1125 | |
| 1126 | Status MakeComplex128(std::shared_ptr<RecordBatch>* out) { |
| 1127 | auto type = complex128(); |
| 1128 | auto storage_type = checked_cast<const ExtensionType&>(*type).storage_type(); |
| 1129 | |
| 1130 | auto f0 = field("f0", type); |
| 1131 | auto f1 = field("f1", type, /*nullable=*/false); |
| 1132 | auto schema = ::arrow::schema({f0, f1}); |
| 1133 | |
| 1134 | auto a0 = ExtensionType::WrapArray(complex128(), |
| 1135 | ArrayFromJSON(storage_type, "[[1.0, -2.5], null]")); |
| 1136 | auto a1 = ExtensionType::WrapArray( |
| 1137 | complex128(), ArrayFromJSON(storage_type, "[[1.0, -2.5], [3.0, -4.0]]")); |
| 1138 | |
| 1139 | *out = RecordBatch::Make(schema, a1->length(), {a0, a1}); |
| 1140 | return Status::OK(); |
| 1141 | } |
| 1142 | |
| 1143 | Status MakeDictExtension(std::shared_ptr<RecordBatch>* out) { |
| 1144 | auto type = dict_extension_type(); |
no test coverage detected