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