Skip to content

Commit 18f5f50

Browse files
committed
Fix attempt
1 parent e302f4c commit 18f5f50

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tiledb/cc/query.cc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,13 @@ void init_query(py::module &m) {
7474

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

8181
.def("set_offsets_buffer",
8282
[](Query &q, std::string name, py::array a, uint64_t nelements) {
83-
q.set_offsets_buffer(
84-
name, static_cast<uint64_t *>(a.mutable_data()), nelements);
83+
q.set_offsets_buffer(name, (uint64_t *)(a.data()), nelements);
8584
})
8685

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

9291
.def("set_validity_buffer",
9392
[](Query &q, std::string name, py::array a, uint64_t nelements) {
94-
q.set_validity_buffer(
95-
name, static_cast<uint8_t *>(a.mutable_data()), nelements);
93+
q.set_validity_buffer(name, (uint8_t *)(a.data()), nelements);
9694
})
9795

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

0 commit comments

Comments
 (0)