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