| 1071 | } |
| 1072 | |
| 1073 | Status MakeDecimal(std::shared_ptr<RecordBatch>* out) { |
| 1074 | constexpr int kLength = 10; |
| 1075 | auto type = decimal128(38, 4); |
| 1076 | auto f0 = field("f0", type); |
| 1077 | auto f1 = field("f1", type); |
| 1078 | auto schema = ::arrow::schema({f0, f1}); |
| 1079 | |
| 1080 | auto gen = random::RandomArrayGenerator(/*seed=*/1); |
| 1081 | auto a1 = gen.Decimal128(type, kLength, /*null_probability=*/0.1); |
| 1082 | auto a2 = std::make_shared<Decimal128Array>(type, kLength, a1->data()->buffers[1]); |
| 1083 | |
| 1084 | *out = RecordBatch::Make(schema, kLength, {a1, a2}); |
| 1085 | return Status::OK(); |
| 1086 | } |
| 1087 | |
| 1088 | Status MakeNull(std::shared_ptr<RecordBatch>* out) { |
| 1089 | auto f0 = field("f0", null()); |
nothing calls this directly
no test coverage detected