paleolimbot opened a new pull request, #1034:
URL: https://github.com/apache/arrow-nanoarrow/pull/1034
Scale int64 timestamp and date64 values using quotient and remainder before
casting to double. This avoids spurious lossy-conversion warnings and preserves
lower-order ticks. POSIXct conversion now warns only when whole seconds exceed
the exact double integer range. Adds coverage for nanoseconds, negatives,
nulls, slices, all units, date64, and precision boundaries.
closes #1031
```r
library(nanoarrow)
ticks <- bit64::as.integer64(c(
"1700000000000000000",
"1700000000123456789"
))
array <- as_nanoarrow_array(
ticks,
schema = na_timestamp("ns", timezone = "UTC")
)
sprintf("%.7f", as.numeric(convert_array(array)))
#> [1] "1700000000.0000000" "1700000000.1234567"
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]