lidavidm commented on code in PR #983:
URL: https://github.com/apache/arrow-adbc/pull/983#discussion_r1297554199
##########
python/adbc_driver_manager/adbc_driver_manager/dbapi.py:
##########
@@ -926,6 +926,19 @@ def fetch_df(self) -> "pandas.DataFrame":
)
return self._results.fetch_df()
+ def fetch_query_schema(self, operation: Union[bytes, str],
parameters=None) -> pyarrow.Schema:
+ """
+ Fetch the output schema for the given query.
+
+ Notes
+ ----
+ This is an extension and not part of the DBAPI standard.
+ """
+ self._prepare_execute(operation, parameters)
+ handle, _ = self._stmt.execute_query()
+ rbr = pyarrow.RecordBatchReader._import_from_c(handle.address)
Review Comment:
This will still execute the query. If that's what you want, then just
execute the query explicitly instead of this, which is just a method that lies
to the caller.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]