Use tiledb_query_get_status_details to regulate buffer resizing
#include <tiledb/arrowio>
#include <tiledb/tiledb.h> // C
#include <tiledb/tiledb> // C++
+#include <tiledb/tiledb_experimental.h> // C
#include <tiledb/tiledb_serialization.h> // C
#include "../external/string_view.hpp"
@@ -943,6 +944,15 @@ public:
}
void resubmit_read() {
+#if TILEDB_VERSION_MAJOR == 2 && TILEDB_VERSION_MINOR >= 6
+ tiledb_query_status_details_t status_details;
+ tiledb_query_get_status_details(ctx_.ptr().get(), query_.get()->ptr().get(),
+ &status_details);
+
+ if (status_details.incomplete_reason == TILEDB_REASON_USER_BUFFER_SIZE) {
+#else
+ if (true) {
+#endif
auto start_incomplete_buffer_update =
std::chrono::high_resolution_clock::now();
for (auto &bp : buffers_) {
@@ -979,9 +989,11 @@ public:
if (g_stats) {
auto now = std::chrono::high_resolution_clock::now();
- g_stats.get()->counters["py.read_query_incomplete_buffer_resize_time"] +=
+ g_stats.get()
+ ->counters["py.read_query_incomplete_buffer_resize_time"] +=
now - start_incomplete_buffer_update;
}
+ }
{
py::gil_scoped_release release;
