Skip to content

Conversation

kounelisagis
Copy link
Member

@kounelisagis kounelisagis commented Jun 26, 2025

In #5490, Subarray::add_point_ranges_var was introduced as a user-friendly alternative to avoid the need to manually iterate and construct (point, point) tuples for each query point. However, the initial implementation was using a Range constructor intended for fixed-sized data. This was incorrect for variable-sized dimensions since it didn't utilize the appropriate set_range_var() method, which is responsible for correctly setting internal attributes such as var_size_.

Additionally, the test for this functionality didn't use the correct getter for retrieving variable-sized ranges from the subarray.


TYPE: BUG
DESC: Fix Subarray::add_point_ranges_var to use the appropriate variable data Range constructor.

@kounelisagis kounelisagis merged commit 31c500c into main Jun 26, 2025
58 checks passed
@kounelisagis kounelisagis deleted the agis/fix-add_point_ranges_var branch June 26, 2025 14:15
@kounelisagis
Copy link
Member Author

/backport to release-2.28

Copy link
Contributor

Started backporting to release-2.28: https://github.com/TileDB-Inc/TileDB/actions/runs/15911632573

ypatia pushed a commit that referenced this pull request Jun 30, 2025
…he appropriate variable data `Range` constructor. (#5560) (#5562)

Backport of #5560 to release-2.28

---
TYPE: BUG
DESC: Fix Subarray::add_point_ranges_var to use the appropriate variable
data Range constructor.

---------

Co-authored-by: Agisilaos Kounelis <kounelisagis@gmail.com>
kounelisagis added a commit that referenced this pull request Jul 1, 2025
…en range and dimension. (#5569)

Previously, when adding a range to a dimension in `Subarray::add_range`,
there was no validation to ensure that the variable-size property of the
range matched that of the target dimension. This could lead to bugs,
especially for variable-length dimensions, as was the case in
#5490, which was later
addressed in #5560.

This PR adds a validation check to ensure that the `var_size` of the
range matches the `var_size` of the corresponding dimension. If there is
a mismatch, a `SubarrayException` is thrown early.

Closes CORE-283

---
TYPE: IMPROVEMENT
DESC: Fix `Subarray::add_range` to validate var_size consistency between
range and dimension.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants