| 245 | } |
| 246 | |
| 247 | arrow::Result<std::shared_ptr<RecordBatch>> VeryLargeBatch() { |
| 248 | // In CI, some platforms don't let us allocate one very large |
| 249 | // buffer, so allocate a smaller buffer and repeat it a few times |
| 250 | constexpr int64_t nbytes = (1ul << 27ul) + 8ul; |
| 251 | constexpr int64_t nrows = nbytes / 8; |
| 252 | constexpr int64_t ncols = 16; |
| 253 | ARROW_ASSIGN_OR_RAISE(auto values, AllocateBuffer(nbytes)); |
| 254 | std::memset(values->mutable_data(), 0x00, values->capacity()); |
| 255 | std::vector<std::shared_ptr<Buffer>> buffers = {nullptr, std::move(values)}; |
| 256 | auto array = std::make_shared<ArrayData>(int64(), nrows, buffers, |
| 257 | /*null_count=*/0); |
| 258 | std::vector<std::shared_ptr<ArrayData>> arrays(ncols, array); |
| 259 | std::vector<std::shared_ptr<Field>> fields(ncols, field("a", int64())); |
| 260 | return RecordBatch::Make(schema(std::move(fields)), nrows, std::move(arrays)); |
| 261 | } |
| 262 | |
| 263 | std::vector<ActionType> ExampleActionTypes() { |
| 264 | return {{"drop", "drop a dataset"}, {"cache", "cache a dataset"}}; |
nothing calls this directly
no test coverage detected