Skip to content

[R] arrow::write_parquet error with zero-length datetimes in R 4.5.2 #48832

@pmac0451

Description

@pmac0451

Description

Using R 4.5.2 there is an error using arrow::write_parquet with zero-length datetimes:
Error: Invalid: Invalid conversion to timestamp

I believe this may be caused by the following change in the release note for R 4.5.2 (patched):

str(x, give.attr=FALSE) no longer shows attributes when x is a zero length "Date" or "POSIXt" object.

I can't be sure if the error was present before the patched release of 4.5.2 on 5 Jan 2026.

Reprex

dplyr::tibble(
    timeStamp = as.POSIXct(x = NULL), # works ok with this line commented out
    otherColumn = character()
  ) |>
  arrow::write_parquet(
    sink = tempfile(fileext = ".parquet")
  )

Component(s)

R

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions