I found that the display() function returned this issue when it came across date-type fields that were NULL. The following function seemed to fix the problem:
library(tidyverse)
library(lubridate)
display_fixed = function(df) {
df %>%
mutate( across( where(is.instant), ~if_else( is.na(.x), as_datetime("1900-01-01"), as_datetime(.x)) ) ) %>%
display()
}
Try the following in your test example:
dat2 %>% collect(n=10) %>% display_fixed()