| 1086 | } |
| 1087 | |
| 1088 | Status MakeNull(std::shared_ptr<RecordBatch>* out) { |
| 1089 | auto f0 = field("f0", null()); |
| 1090 | |
| 1091 | // Also put a non-null field to make sure we handle the null array buffers properly |
| 1092 | auto f1 = field("f1", int64()); |
| 1093 | |
| 1094 | auto schema = ::arrow::schema({f0, f1}); |
| 1095 | |
| 1096 | auto a1 = std::make_shared<NullArray>(10); |
| 1097 | |
| 1098 | std::vector<int64_t> int_values = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; |
| 1099 | std::vector<bool> is_valid = {true, true, true, false, false, |
| 1100 | true, true, true, true, true}; |
| 1101 | std::shared_ptr<Array> a2; |
| 1102 | ArrayFromVector<Int64Type, int64_t>(f1->type(), is_valid, int_values, &a2); |
| 1103 | |
| 1104 | *out = RecordBatch::Make(schema, a1->length(), {a1, a2}); |
| 1105 | return Status::OK(); |
| 1106 | } |
| 1107 | |
| 1108 | Status MakeUuid(std::shared_ptr<RecordBatch>* out) { |
| 1109 | auto uuid_type = uuid(); |
no test coverage detected