Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snap change for postgres #1564

Open
simonpcouch opened this issue Dec 2, 2024 · 2 comments · May be fixed by #1567
Open

snap change for postgres #1564

simonpcouch opened this issue Dec 2, 2024 · 2 comments · May be fixed by #1567

Comments

@simonpcouch
Copy link
Collaborator

Seeing on GHA re: column casts with PostgreSQL:

── Failure (test-backend-postgres.R:341:3): casts `y` column for local df ──────
... %>% collect() (`actual`) not equal to `out` (`expected`).

actual vs expected
                val
  actual[1, ]    10
- actual[2, ]    20
+ expected[2, ]  10

`actual$val`:   "10" "20"
`expected$val`: "10" "10"

── Failure (test-backend-postgres.R:367:3): casts `y` column for local df ──────
tbl(con, "df_x") %>% collect() (`actual`) not equal to `out` (`expected`).

actual vs expected
                val
  actual[1, ]    10
- actual[2, ]    20
+ expected[2, ]  10

`actual$val`:   "10" "20"
`expected$val`: "10" "10"

Here's the last run where that test passed on 10/31 and the first where it failed on 11/06. Both have PostgreSQL 17.0 (Debian 17.0-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit, on Ubuntu 22.04.

I was able to replicate on Linux with pak::local_install_dev_deps(), then mirroring the GHA service with:

sudo docker run --name postgres-dev \
  -e POSTGRES_USER=postgres \
  -e POSTGRES_PASSWORD=password \
  -e POSTGRES_DB=test \
  -p 5432:5432 \
  -d postgres

sudo docker exec postgres-dev pg_isready -U postgres

and:

con <- DBI::dbConnect(RPostgres::Postgres(),
  dbname = "test",
  host = "localhost",
  port = 5432,
  user = "postgres",
  password = "password"
)

Related to #965--I don't think the fix here is just a snap update.

@simonpcouch
Copy link
Collaborator Author

bit64, RPostgres, RPostgreSQL R package versions line up too.

Nothing jumps out at me here—@mgirlich, any intuition?

@edward-burn
Copy link
Contributor

To chip in, this seems like a (new?) issue with the way bit64 is being used here

val = bit64::as.integer64(10L, 20L),

bit64::as.integer64(10L)
#> integer64
#> [1] 10
bit64::as.integer64(20L)
#> integer64
#> [1] 20
# as is in test
bit64::as.integer64(10L, 20L)
#> integer64
#> [1] 10
# workaround
bit64::as.integer64(c(10L, 20L))
#> integer64
#> [1] 10 20

Created on 2024-12-29 with reprex v2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants