Skip to content

Commit

Permalink
Make end index exclusive during ordered extraction to match behaviour…
Browse files Browse the repository at this point in the history
… of clp
  • Loading branch information
gibber9809 committed Nov 12, 2024
1 parent 04857b0 commit efd9218
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/core/src/clp_s/JsonConstructor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ void JsonConstructor::construct_in_order() {

std::vector<bsoncxx::document::value> results;
auto finalize_chunk = [&](bool open_new_writer) {
// Add one to last_idx to match clp's behaviour of having the end index be exclusive
++last_idx;
writer.close();
std::string new_file_name = src_path.string() + "_" + std::to_string(first_idx) + "_"
+ std::to_string(last_idx) + ".jsonl";
Expand Down

0 comments on commit efd9218

Please sign in to comment.