Fix the error caused by non-decodable bytes when retrieving the non-empty domain for TILEDB_ASCII
dimensions
#2164
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.
As discovered in TileDB-ML, calling the
Array::_non_empty_domain
pybind11 function on aTILEDB_ASCII
dimension containing non-decodable bytes (in terms of UTF-8) resulted in errors such as:UnicodeDecodeError: 'utf-8' codec can't decode byte 0x81 in position 0: invalid start byte
.The
pybind11::make_tuple
function assumed that the input would always be a printable string, requiring special handling for this case.This PR addresses the issue and also ensures that an exception is thrown for dimensions of unicode string type, as this is not supported until TileDB 2.27.0.
[sc-63472]