[r] Accomodate legacy validity setting #1100
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue and/or context:
This PR accommodates the new legacy validity mode (for nullable string columns) added in TileDB-Inc/TileDB-R#517
Changes:
A new metadata tag,
soma_legacy_validity
, is now attached to all arrays created bySOMA
objects. By default this value is"false"
unless the TileDB-R legacy validity mode was enabled at creation time (i.e., via config optionr.legacy_validity_mode
). When reading arrays from disk, theAnnotationDataFrame
class will check for this tag on initialization and when performing reads or writes. If the tag is present and set to"true"
, legacy validity mode is enabled globally (as it's not possible to set on a per-array basis). Legacy validity mode is also enabled when readingAnnotationDataFrame
arrays that lack the tag, as this indicates the array was created with an older version of the package. These checks are limited toAnnotationDataFrame
arrays because the incorrect validity map values only affect nullable string attributes. See TileDB-R's release notes for more information.Notes for Reviewer:
See PR 99 in tiledbsc and SC 25774.