| 1248 | } |
| 1249 | |
| 1250 | Future<int64_t> CountRowsAsync(io::IOContext io_context, |
| 1251 | std::shared_ptr<io::InputStream> input, |
| 1252 | Executor* cpu_executor, const ReadOptions& read_options, |
| 1253 | const ParseOptions& parse_options) { |
| 1254 | RETURN_NOT_OK(parse_options.Validate()); |
| 1255 | RETURN_NOT_OK(read_options.Validate()); |
| 1256 | auto counter = std::make_shared<CSVRowCounter>( |
| 1257 | io_context, cpu_executor, std::move(input), read_options, parse_options); |
| 1258 | return counter->Count(); |
| 1259 | } |
| 1260 | |
| 1261 | } // namespace csv |
| 1262 |