| 136 | using Int96Vector = std::vector<Int96>; |
| 137 | |
| 138 | Result<std::vector<Int96Vector>> SampleInt96() { |
| 139 | auto rag = random::RandomArrayGenerator(/*seed=*/42); |
| 140 | std::vector<Int96Vector> all_data; |
| 141 | |
| 142 | for (const auto size : {50, 5000}) { |
| 143 | // The max value is chosen so that the nanoseconds component remains |
| 144 | // smaller than kNanosecondsPerDay. |
| 145 | auto ints = rag.Int32(size * 3, /*min=*/0, /*max=*/20000); |
| 146 | const Int96* int96_data = reinterpret_cast<const Int96*>( |
| 147 | checked_cast<const Int32Array&>(*ints).raw_values()); |
| 148 | all_data.push_back(Int96Vector(int96_data, int96_data + size)); |
| 149 | } |
| 150 | return all_data; |
| 151 | } |
| 152 | |
| 153 | Status DoMain(const std::string& out_dir) { |
| 154 | ARROW_ASSIGN_OR_RAISE(auto dir_fn, internal::PlatformFilename::FromString(out_dir)); |
nothing calls this directly
no test coverage detected