You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by GitBox <gi...@apache.org> on 2023/01/06 21:01:19 UTC

[GitHub] [arrow-adbc] lidavidm opened a new issue, #318: [Format][C] Add `AdbcStatementExecuteSchema`

lidavidm opened a new issue, #318:
URL: https://github.com/apache/arrow-adbc/issues/318

   It would be useful to be able to get the schema of a query's result set without actually executing it. For example, [Ibis](https://ibis-project.org/docs/dev/) uses this to allow [embedding arbitrary SQL](https://ibis-project.org/docs/dev/api/expressions/tables/#ibis.expr.types.relations.Table.set_column) within its DSL. And Flight SQL already supports this. 
   
   We could add a new function:
   
   ```c
   AdbcStatusCode AdbcStatementExecuteSchema(
     struct AdbcStatement* statement,
     struct ArrowSchema* schema,
     struct AdbcError* error);
   ```
   
   - Drivers may implement this by executing the query.
   - They may attempt to transform the query to limit side effects and execution time, however, this is not guaranteed.
     - In other words, don’t use this with DML/DDL queries, though that doesn’t really make sense in the first place.
     - If the client itself is able to transform the query to limit execution time, this is still a good idea.
   
   See #317 for how backwards compatibility would be managed.


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

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


[GitHub] [arrow-adbc] lidavidm closed issue #318: [Format] Add `AdbcStatementExecuteSchema`

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm closed issue #318: [Format] Add `AdbcStatementExecuteSchema`
URL: https://github.com/apache/arrow-adbc/issues/318


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

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


[GitHub] [arrow-adbc] tokoko commented on issue #318: [Format] Add `AdbcStatementExecuteSchema`

Posted by GitBox <gi...@apache.org>.
tokoko commented on issue #318:
URL: https://github.com/apache/arrow-adbc/issues/318#issuecomment-1380918932

   I started rewriting spark-flight-sql data source to spark-adbc (https://github.com/tokoko/spark-adbc), this function would greatly simplify efficient schema inference. I can give implementing this a try (at least in Java) if that's okay with you.
   
   P.S. Wouldn't it make more sense for the drivers to fail if schema detection can't be accomplished without significant execution time? (up to drivers to decide what "significant" means) I'm thinking of stored procedures in case of jdbc, for example. It would force clients to explicitly call executeQuery in such cases and avoid inadvertently executing long-running queries.


-- 
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 issue #318: [Format] Add `AdbcStatementExecuteSchema`

Posted by GitBox <gi...@apache.org>.
lidavidm commented on issue #318:
URL: https://github.com/apache/arrow-adbc/issues/318#issuecomment-1381015182

   Failing probably makes more sense, we should make sure to define the error code in that case.
   
   Since this affects the spec, we're still deciding how best to handle the development process; if you're interested, please chime in on the mailing list. https://lists.apache.org/thread/3y73755p0w4n25rd5ry2ppnhzkz3thv3


-- 
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