Validate everything is as it should be, returns true if it's all good, false o.w.
177011 {
177012 bool initialized = false;
177013 idx_t last_end_pos = 0;
177014 for (auto &line_info : thread_lines) {
177015 if (!initialized) {
177016
177017 initialized = true;
177018 } else {
177019 if (line_info.second.start_pos == line_info.second.end_pos) {
177020 last_end_pos = line_info.second.end_pos;
177021 continue;
177022 }
177023 if (last_end_pos +
error_margin < line_info.second.start_pos ||
177024 line_info.second.start_pos < last_end_pos -
error_margin) {
177025 std::ostringstream error;
177026 error << "The Parallel CSV Reader currently does not support a full read on this file." << '\n';
177027 error << "To correctly parse this file, please run with the single threaded error (i.e., parallel = "
177028 "false)"
177029 << '\n';
177030 throw NotImplementedException(error.str());
177031 }
177032 }
177033 last_end_pos = line_info.second.end_pos;
177034 }
177035}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
static constexpr idx_t error_margin
We allow up to 2 bytes of error margin (basically \r ).
Definition duckdb.cpp:166466