Skip to content

Commit efd9218

Browse files
committed
Make end index exclusive during ordered extraction to match behaviour of clp
1 parent 04857b0 commit efd9218

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

components/core/src/clp_s/JsonConstructor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ void JsonConstructor::construct_in_order() {
9797

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

0 commit comments

Comments
 (0)