-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Missing DataAPI.defaultarray support #27
Comments
Thanks for reporting this. I noticed this issue but haven't got a chance to fix it, although this is definitely something that should be addressed. I will need to figure out a more robust way to deal with the value labels in this case. |
Note that the standard way to use this functionality is:
The point of this approach is to ensure efficiency of concatenation operation (you allocate |
And to add - the general idea of this design is to ensure that proper
(the common case is that all vectors have the same element type) |
@bkamins The difficulty I encountered earlier was that I didn't find a simple way to inform |
This is what I expected. The API was designed to be type-based only. |
Ah, I just saw your comment above with |
This is the original intention 😄. Thank you! |
In general @nalimilan went through the same process in CategoricalArrays.jl so maybe he would have some more comments. |
Yes, you can take inspiration from https://github.com/JuliaData/CategoricalArrays.jl/blob/246e8f0c86fbc08a664266c9e0edffbc24727298/src/array.jl#L524-L647 That's relatively straightforward, but there is an ambiguity with SentinelArrays (JuliaData/CategoricalArrays.jl#369), which requires a special method using an extension: https://github.com/JuliaData/CategoricalArrays.jl/blob/246e8f0c86fbc08a664266c9e0edffbc24727298/ext/CategoricalArraysSentinelArraysExt.jl This also raised a deeper issue in CategoricalArrays: should Then there's an additional complication regarding what to do if people combine values from different |
@bkamins @nalimilan Thank you so much for the helpful comments here! I did something as simple as possible here: #28. The logic is to simply update the value labels associated with the destination |
It does! Thanks @junyuan-chen and @bkamins! |
See JuliaData/DataFrames.jl#3351 (comment).
This is needed for ReasStatTables.jl to interoperate seamlessly with Tables.jl.
The text was updated successfully, but these errors were encountered: