You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "nbenn (via GitHub)" <gi...@apache.org> on 2023/09/29 11:43:42 UTC
[GitHub] [arrow-adbc] nbenn opened a new issue, #1131: format: validity of executing a query w/ placeholders but no bound parameters
nbenn opened a new issue, #1131:
URL: https://github.com/apache/arrow-adbc/issues/1131
Currently the following is valid:
```r
library(adbcdrivermanager)
db <- adbc_database_init(adbcsqlite::adbcsqlite(), uri = ":memory:")
con <- adbc_connection_init(db)
write_adbc(datasets::swiss, con, "swiss")
stmt <- adbc_statement_init(con)
adbc_statement_set_sql_query(stmt, "SELECT * from swiss WHERE Agriculture < ?")
res <- nanoarrow::nanoarrow_allocate_array_stream()
adbc_statement_execute_query(stmt, res)
#> [1] -1
as.data.frame(res)
#> [1] Fertility Agriculture Examination Education
#> [5] Catholic Infant.Mortality
#> <0 rows> (or 0-length row.names)
```
Is this intentionally so? Should statement execution here not maybe error in some way, or at least signal to the caller that something is not quite right? I did some light digging and found `AdbcStatementExecuteQuery()` returns `0` and `rows_affected` is set to `-1` for the above example.
Please do close again, if this is how you feel this should behave.
(Not sure about the "format" classification; my reproducible example is using the R bindings, but I don't think that matters much here.)
--
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] nbenn commented on issue #1131: format: validity of executing a query w/ placeholders but no bound parameters
Posted by "nbenn (via GitHub)" <gi...@apache.org>.
nbenn commented on issue #1131:
URL: https://github.com/apache/arrow-adbc/issues/1131#issuecomment-1740963957
Ok, got it, thanks. I'll close again.
--
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 #1131: format: validity of executing a query w/ placeholders but no bound parameters
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #1131:
URL: https://github.com/apache/arrow-adbc/issues/1131#issuecomment-1740784655
It's mostly up to the backend to decide what to do here, and apparently SQLite has decided that this is perfectly OK. Drivers can choose to do more query preprocessing but I would expect most/all of them will not (the exception maybe being Postgres choosing to wrap your query in COPY).
--
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] nbenn closed issue #1131: format: validity of executing a query w/ placeholders but no bound parameters
Posted by "nbenn (via GitHub)" <gi...@apache.org>.
nbenn closed issue #1131: format: validity of executing a query w/ placeholders but no bound parameters
URL: https://github.com/apache/arrow-adbc/issues/1131
--
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