Skip to content

Commit

Permalink
Fix attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
kounelisagis committed Dec 6, 2024
1 parent e302f4c commit 18f5f50
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tiledb/cc/query.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,13 @@ void init_query(py::module &m) {

.def("set_data_buffer",
[](Query &q, std::string name, py::array a, uint64_t nelements) {
QueryExperimental::set_data_buffer(q, name, a.mutable_data(),
nelements);
QueryExperimental::set_data_buffer(
q, name, const_cast<void *>(a.data()), nelements);
})

.def("set_offsets_buffer",
[](Query &q, std::string name, py::array a, uint64_t nelements) {
q.set_offsets_buffer(
name, static_cast<uint64_t *>(a.mutable_data()), nelements);
q.set_offsets_buffer(name, (uint64_t *)(a.data()), nelements);
})

.def("set_subarray",
Expand All @@ -91,8 +90,7 @@ void init_query(py::module &m) {

.def("set_validity_buffer",
[](Query &q, std::string name, py::array a, uint64_t nelements) {
q.set_validity_buffer(
name, static_cast<uint8_t *>(a.mutable_data()), nelements);
q.set_validity_buffer(name, (uint8_t *)(a.data()), nelements);
})

.def("_submit", &Query::submit, py::call_guard<py::gil_scoped_release>())
Expand Down

0 comments on commit 18f5f50

Please sign in to comment.