Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: update range end when merging overlapping subarray ranges. #5268

Merged
merged 6 commits into from
Sep 3, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tiledb/sm/subarray/range_subset.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* The MIT License
*
* @copyright Copyright (c) 2017-2023 TileDB, Inc.
* @copyright Copyright (c) 2017-2024 TileDB, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -169,7 +169,10 @@ struct MergeStrategy<
tail->start_as<T>() <= head_end;

if (can_merge) {
head->set_end_fixed(tail->end_fixed());
// Only update the end if the merging end is greater.
if (tail->end_as<T>() > head->end_as<T>()) {
head->set_end_fixed(tail->end_fixed());
}
merged_cells++;
} else {
head++;
Expand Down
Loading