Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Improve error message for unnest with empty list #148

Open
ablaagaard opened this issue May 10, 2022 · 1 comment
Open

Improve error message for unnest with empty list #148

ablaagaard opened this issue May 10, 2022 · 1 comment

Comments

@ablaagaard
Copy link

Reduced test case:
dataFrameOf("a", "b")(listOf(), 1).unnest("a")
fails with "Provided data does not coerce to tabular shape"

It took me a while to figure out from a larger dataset that the empty list was the problem.
I guess unnest could also be defined to unnest to zero rows in this case, but maybe that is too magical.

@holgerbrandl
Copy link
Owner

Not sure if unnesting to zero row dataframe is much better here. Do you know how dplyr handles this example?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants