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

[r] Handle numeric coords better in SOMASparseNDArray$read() #3145

Conversation

mojaveazure
Copy link
Member

Fix bug in handling of numeric coordinates when reading a sparse array. Now, always cast any integerish value to bit64::integer64 (casting a bit64::integer64 to a bit64::integer64 is a no-op). Also strengthen value checking of coords to

  • require coords to be a list of NULL or positive, finite, integerish values
  • require coords to have a length
  • require coords to be a list of length array$dimnames() or be named with array$dimnames()
  • filter NULLs from coords; if coords is all NULL, convert to NULL

Modified SOMA methods:

  • SOMANDArrayBase$private$.convert_coords(): cast all integerish values to bit64::integer64; strengthen value checking of coords

SC-57096

Fix bug in handling of numeric coordinates when reading a sparse array.
Now, always cast any integerish value to `bit64::integer64` (casting a
`bit64::integer64` to a `bit64::integer64` is a no-op). Also strengthen
value checking of `coords` to
 - require `coords` to be a list of `NULL` or positive, finite,
   integerish values
 - require `coords` to have a length
 - require `coords` to be a list of length `array$dimnames()` or be
   named with `array$dimnames()`
 - filter `NULLs` from `coords`; if `coords` is all `NULL`, convert to
   `NULL`

Modified SOMA methods:
 - `SOMANDArrayBase$private$.convert_coords()`: cast all integerish
   values to `bit64::integer64`; strengthen value checking of `coords`

[SC-57096](https://app.shortcut.com/tiledb-inc/story/57096)
Copy link
Member

@johnkerl johnkerl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

Bump develop version

[ci skip]
@mojaveazure mojaveazure merged commit 7302c2c into main Oct 8, 2024
@mojaveazure mojaveazure deleted the paulhoffman/sc-57096/tiledbsoma-r-somasparsendarray-read-does branch October 8, 2024 00:32
johnkerl added a commit that referenced this pull request Oct 8, 2024
johnkerl added a commit that referenced this pull request Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants