You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "abandy (via GitHub)" <gi...@apache.org> on 2023/08/17 17:45:39 UTC

[GitHub] [arrow-adbc] abandy opened a new pull request, #983: Add fetching of query schema to python cursor

abandy opened a new pull request, #983:
URL: https://github.com/apache/arrow-adbc/pull/983

   (no comment)


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] lidavidm commented on a diff in pull request #983: feat(python/adbc_driver_manager): Add fetching of query schema to python cursor

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] lidavidm commented on pull request #983: feat(python/adbc_driver_manager): Add fetching of query schema to python cursor

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on PR #983:
URL: https://github.com/apache/arrow-adbc/pull/983#issuecomment-1682910639

   This is still not what we want. #968 makes more sense.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] lidavidm closed pull request #983: feat(python/adbc_driver_manager): Add fetching of query schema to python cursor

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm closed pull request #983: feat(python/adbc_driver_manager): Add fetching of query schema to python cursor
URL: https://github.com/apache/arrow-adbc/pull/983


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-adbc] github-actions[bot] commented on pull request #983: Add fetching of query schema to python cursor

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #983:
URL: https://github.com/apache/arrow-adbc/pull/983#issuecomment-1682711323

   :warning: Please follow the [Conventional Commits format in CONTRIBUTING.md](https://github.com/apache/arrow-adbc/blob/main/CONTRIBUTING.md) for PR titles.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org