-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid column reference on empty table #275
Comments
Thanks for the question. Unlike an empty array (as with the other tools you mention) an empty table in Arquero has a schema describing which columns are defined. Disabling column checks for empty tables would introduce an inconsistency (and might possibly miss genuine errors!) and I'm unsure how much benefit it provides in return -- as soon as a table has one or more rows, the error would of course be raised. To check if a table has zero rows you can use |
Thanks for the clarification. Anyway, thanks for your efforts! I'll update my mental model, so you can consider this issue resolved. |
Minimal example:
throws:
Error: Invalid column reference: "d.key"
Why not return empty table if the input is empty?
My intuition from other libs (d3, lodash, Array.prototype) suggests, that if the input is empty, it should be safe.
If it's by design, what's the arquero way to handle empty inputs?
This seems like an awkward workaround:
The text was updated successfully, but these errors were encountered: