File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -332,9 +332,13 @@ py::list DuckDBPyConnection::ListFilesystems() {
332332}
333333
334334py::list DuckDBPyConnection::ExtractStatements (const string &query) {
335+ vector<unique_ptr<SQLStatement>> statements;
336+ {
337+ py::gil_scoped_release gil;
338+ statements = connection.ExtractStatements (query);
339+ }
335340 py::list result;
336341 auto &connection = con.GetConnection ();
337- auto statements = connection.ExtractStatements (query);
338342 for (auto &statement : statements) {
339343 result.append (make_uniq<DuckDBPyStatement>(std::move (statement)));
340344 }
@@ -624,6 +628,7 @@ vector<unique_ptr<SQLStatement>> DuckDBPyConnection::GetStatements(const py::obj
624628 }
625629 if (py::isinstance<py::str>(query)) {
626630 auto sql_query = std::string (py::str (query));
631+ py::gil_scoped_release gil;
627632 return connection.ExtractStatements (sql_query);
628633 }
629634 throw InvalidInputException (" Please provide either a DuckDBPyStatement or a string representing the query" );
You can’t perform that action at this time.
0 commit comments