Giter Site home page Giter Site logo

Comments (6)

hadley avatar hadley commented on June 24, 2024

Please include a minimal reproducible example that actually verifies that the values are different (not just printed differently, e.g. by subtracting the two values)

from rpostgres.

kirillseva avatar kirillseva commented on June 24, 2024

Sure. I only spotted this because I was migrating a package to use RPostgres, and it fails on writing this dataframe: https://github.com/robertzk/cachemeifyoucan/blob/master/tests/testthat/helper-batch_data.R
I'll try to come up with a simpler example in the mean time

from rpostgres.

kirillseva avatar kirillseva commented on June 24, 2024

Here!

Browse[1]> conn
<PqConnection> travis@localhost:5432
Browse[1]> df_ref
  id         x          y
1  1 0.5608329 -1.4917053
2  2 0.7946495 -0.3914652
3  3 0.5892545  0.9543467
4  4 0.8914159 -1.0087213
5  5 0.5881625  1.0540364
Browse[1]> DBI::dbWriteTable(conn, 'will_drop_digits', df_ref)
[1] TRUE
Browse[1]> df_check <- dbReadTable(conn, 'will_drop_digits')
Browse[1]> df_check
  id        x         y
1  1 0.560833 -1.491710
2  2 0.794649 -0.391465
3  3 0.589254  0.954347
4  4 0.891416 -1.008720
5  5 0.588162  1.054040
Browse[1]> df_check$x == df_ref$x
[1] FALSE FALSE FALSE FALSE FALSE
Browse[1]> df_check$x - df_ref$x
[1]  1.454068e-07 -4.519711e-07 -4.533126e-07  1.262247e-07 -4.661852e-07

Output from psql

travis=> select * from will_drop_digits ;
 id |    x     |     y
----+----------+-----------
  1 | 0.560833 |  -1.49171
  2 | 0.794649 | -0.391465
  3 | 0.589254 |  0.954347
  4 | 0.891416 |  -1.00872
  5 | 0.588162 |   1.05404
(5 rows)

from rpostgres.

hadley avatar hadley commented on June 24, 2024

Can you please make an example that I can copy and paste into R easily?

from rpostgres.

kirillseva avatar kirillseva commented on June 24, 2024

Don't know what happened, but my tests magically passed today. Closing the issue.

The only thing I've changed in my code was update R and change dbGetQuery(conn, "BEGIN") to dbSendQuery, but I presume something happened in this repo or in the R version.

from rpostgres.

github-actions avatar github-actions commented on June 24, 2024

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

from rpostgres.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.