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

Factor write_direct_dense out of Cython #2109

Open
wants to merge 3 commits into
base: pybind11-full
Choose a base branch
from

Conversation

kounelisagis
Copy link
Member

@kounelisagis kounelisagis commented Nov 15, 2024

This PR integrates the write_direct_dense functionality directly into Python's DenseArray::write_direct, using only the pybind11/C++ bindings.

Regarding test changes:

  • For tiledb/tests/test_hypothesis.py::test_bytes_npdf[np], the change from uri = "mem://" + checked_path.path() to uri = checked_path.path() was necessary to make it work. This is because, for example, a URI could be: mem:///var/folders/gw/5rx7wg1d6397n6nwy86qjf7c0000gn/T/tiledb-disktestcasepvi959vz/tmphgkelovb. The issue seems to be the use of ///. I guess that speed was the primary concern for using mem://.
  • For tiledb/tests/test_libtiledb.py::test_fixed_string, a change in the dtype of the numpy array was required. This is because the np_to_tdb_dtype function (see here) cannot handle numpy arrays with multiple dtypes. This issue is expected to arise elsewhere in the codebase wherever this function is called with numpy arrays containing multiple dtypes. Addressing this limitation could be implemented in a future PR, as I believe it falls outside the scope of this one.

Copy link
Member

@ihnorton ihnorton left a comment

Choose a reason for hiding this comment

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

This is because the np_to_tdb_dtype function (see here) cannot handle numpy arrays with multiple dtypes.

I think we need to dig in to this one more, because it doesn't exactly have multiple dtypes -- the dtype is a record type. Also the mem:// issue, see inline.

tiledb/tests/test_hypothesis.py Outdated Show resolved Hide resolved
@kounelisagis kounelisagis force-pushed the agis/move-write_direct_dense-to-python branch from 7b7929c to bf869f3 Compare November 19, 2024 18:31
Copy link
Member

@ihnorton ihnorton left a comment

Choose a reason for hiding this comment

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

LGTM, would like to get @nguyenv review as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants