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

object_size fails on large objects #420

Open
scottkall opened this issue Aug 2, 2022 · 0 comments
Open

object_size fails on large objects #420

scottkall opened this issue Aug 2, 2022 · 0 comments

Comments

@scottkall
Copy link

as.integer(attr(r, "content-length"))

Hi, I think a simple change here from as.integer to as.double should fix this bug.

I was calling object_size() on a large object, and it was returning NA because the file size was too large.

> object_exists(paste0(s3bucket,"/",s3key))
[1] TRUE
> object_size(paste0(s3bucket,"/",s3key))
[1] NA
Warning message:
In object_size(paste0(s3bucket, "/", s3key)) :
  NAs introduced by coercion to integer range
> attr(head_object(paste0(s3bucket,"/",s3key)),"content-length")
[1] "17350435674"
> as.double("17350435674")
[1] 17350435674
> as.integer("17350435674")
[1] NA
Warning message:
NAs introduced by coercion to integer range 

This is related to #181 and #234 . Thank you!

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

No branches or pull requests

1 participant