-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix write queries using sm.var_offsets.extra_element=true. (#5033)
Story details: https://app.shortcut.com/tiledb-inc/story/48614 The write query uses `coords_info_.coords_num_` as a stand-in for the number of cells in the write query input. This value is computed as `*buffer_offsets_size / constants::cell_var_offset_size`, which makes sense for the traditional tiledb input where the number of offsets is the same as the number of cells. The configuration `sm.var_offsets.extra_element`, however, breaks that assumption. This option is useful for arrow compatibility but also simplifies upstream code - we want to use it in `tiledb-rs`, for example. When this option is used, `coords_num_` must be adjusted accordingly. Previously it was not, and now it is. The added unit test demonstrates that if `num_coords_` is not adjusted, then the unordered writer finds an extra "empty" element at the end. This results in a duplicate coordinate if there is an *actual* empty element. In addition to the unit test, the branch trying to use this feature in `tiledb-rs` passes its property-based testing when linking against this branch of core. --- TYPE: BUG DESC: Fix write queries using `sm.var_offsets.extra_element=true`
- Loading branch information
Showing
2 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters