-
Notifications
You must be signed in to change notification settings - Fork 26
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
[python] Fix readback of some older-style metadata #3653
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3653 +/- ##
==========================================
+ Coverage 86.25% 86.30% +0.04%
==========================================
Files 55 55
Lines 6381 6381
==========================================
+ Hits 5504 5507 +3
+ Misses 877 874 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
3d8d63e
to
e7d7695
Compare
I also validated that the alternative fix
resolves the reported symptom. (Note that that |
@@ -235,7 +235,7 @@ py::dict meta(std::map<std::string, MetadataValue> metadata_mapping) { | |||
results[py::str(key)] = py::array(value_type, value_num, value) | |||
.attr("item")(0); | |||
} else { | |||
py::dtype value_type = tdb_to_np_dtype(tdb_type, 1); | |||
py::dtype value_type = tdb_to_np_dtype(tdb_type, value_num); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either of these two lines fix the symptom. As noted in the description field, though, we need more unit-test coverage here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* [python] Fix readback of some older-style metadata * other fix; why not both?
* [python] Fix readback of some older-style metadata * other fix; why not both? Co-authored-by: John Kerl <[email protected]>
Issue and/or context: sc-62798
Bug introduced as of TileDB-SOMA 1.15.4 via PR #3607 which was the backport to the
release-1.15
branch of #3558.Changes:
Metadata were raeding back incorrectly in the cases when their values'
tdb_type
wasTILEDB_STRING_ASCII
(11) rather thanTILEDB_STRING_UTF8
(12).Note, however, that I ran the following test today:
y
to read metadata written with versionx
Another test:
In short, this occurs for some arrays but not all arrays. (All arrays tested in-house read back fine, with tiledbsoma 1.15.5).
Notes for Reviewer:
Uncertain how to test, given failure to repro with any of my historical or current data.
One idea:
TILEDB_STRING_ASCII