MCPcopy Create free account
hub / github.com/alibaba/zvec / execute_for_python

Function execute_for_python

src/binding/python/model/python_collection.cc:91–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89// the batch into tuples after the GIL is reacquired and the read lock released.
90template <typename Query>
91py::list execute_for_python(const Collection &collection, const Query &query) {
92 Result<internal::QueryResultSnapshot> result;
93 {
94 py::gil_scoped_release release;
95 result = internal::query_result_snapshot(collection, query);
96 }
97 // GIL restored, schema read lock already released.
98 auto snapshot = unwrap_expected(std::move(result));
99 return docs_to_tuples(snapshot.docs, *snapshot.schema);
100}
101
102// Transfer ownership of the native buffer without a per-result Python loop.
103template <typename T>

Callers 1

bind_dql_methodsMethod · 0.85

Calls 3

query_result_snapshotFunction · 0.85
unwrap_expectedFunction · 0.85
docs_to_tuplesFunction · 0.85

Tested by

no test coverage detected