"! Multiple queries must use the same column names." when issuing a query against a Postgres server running with the pg_duckdb extension
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Start by reproducing the two DBI::dbGetQuery() calls against the stated pg_duckdb container, then inspect the RPostgres::dbSendQuery() and RPostgres:::result_create paths named in the traceback. Compare the behavior with the PostgreSQL CLI example and establish whether the failure belongs to RPostgres or pg_duckdb; done means the responsible component and expected handling are identified.
Written by the indexing model from the issue text.
Description
Working with RPostgres against a postgres server with the pg_duckdb extension running in a container (image: pgduckdb/pgduckdb:17-v1.0.0), I can successfully make a connection and count the number of records in a parquet file:
> library(RPostgres); library(DBI);
> con <- dbConnect(
drv = RPostgres::Postgres(),
host = "<redacted>",
user = "<redacted>",
password = "<redacted>",
dbname = "<redacted>"
)
> "SELECT count(*) FROM read_parquet('s3://us-prd-motherduck-open-datasets/netflix/netflix_daily_top_10.parquet')" |>
+ dbGetQuery(conn = con)
count
1 7100
When issuing another query to get the data in the file (this query works using pgsql) I get:
> "SELECT * FROM read_parquet('s3://us-prd-motherduck-open-datasets/netflix/netflix_daily_top_10.parquet')" |>
+ dbGetQuery(conn = con)
Error:
! Multiple queries must use the same column names.
Hide Traceback
▆
1. ├─DBI::dbGetQuery(...)
2. └─DBI::dbGetQuery(...)
3. └─DBI (local) .local(conn, statement, ...)
4. ├─DBI::dbSendQuery(conn, statement, ...)
5. └─RPostgres::dbSendQuery(conn, statement, ...)
6. └─RPostgres (local) .local(conn, statement, ...)
7. ├─methods::new(...)
8. │ ├─methods::initialize(value, ...)
9. │ └─methods::initialize(value, ...)
10. └─RPostgres:::result_create(conn@ptr, statement, immediate)
I am not sure if this is an issue with the pg_duckdb extension for Postgres or whether I haven't understood how to use it properly, but since the same query works in pgsql CLI I was thinking maybe it could be related to RPostgres.
- Dominant language
- R
- Stars
- 343
- Forks
- 82
- Avg merge
- 11h 26m
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from r-dbi/RPostgres
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
pgpass not used? Open
Difficulty 4/5 3-5 days Newbie friendliness 30/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
beginners blocker
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enviPathR OpenBuild Error Build OK Build Warning policies-accepted pre-review precheck-passed
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Bioconductor/BiocContributions#207 · 6 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
datacarpentry/semester-biology#1255 ·