Skip to content

Conversation

@gregleleu
Copy link

data.table no longer fills in rows with NA when some of the values are NULL since 1.15.0.
This broke connection:

  • empty tables are returned
  • Leads to flexpolyline::decode_sf being called on a NULL
  • returning "Invalid format version"

This pull fixes that by recreating the rlang operator %||% and using it to avoid nulls.
Maybe not exactly your philosophy, and maybe needs to be replicated in other places, but a first step towards resolution :)

- Fix NULL not handled by data.table anymore
@munterfi
Copy link
Owner

Hi @gregleleu, thanks for reporting.

Can you post a reproducible example, where this error occurs?

In the tests everything seems to work fine with data.table version 1.15.2.

Thanks!

@munterfi munterfi self-assigned this Mar 16, 2024
@gregleleu
Copy link
Author

Sure:

from <- st_as_sfc("POINT (-0.074385 51.41419)", crs = 4326) %>% st_as_sf()
to   <- st_as_sfc("POINT (-0.072941 51.4144)", crs = 4326) %>% st_as_sf()

hereR::connection(
          origin = from,
          destination = to,
          datetime = as.POSIXct("2024-03-13 08:00:00 UTC"),
          results = 1,
          summary = FALSE)

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

Successfully merging this pull request may close these issues.

2 participants