-
Notifications
You must be signed in to change notification settings - Fork 54
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
DataValue{Any} is not converted to missing #109
Comments
Actually, |
Hmmm........I'm not sure what we can really do here. If the column type is Base.convert(::Type{Any}, x::DataValue{T}) where {T} = isna(x) ? missing : unsafe_get(x) For one, I think convert methods to Any are discouraged, and two, I'm not even sure it makes sense: if you convert to Any, then the input argument itself should just be returned, since that's valid. So as weird as it might seem, I think having the final column type be |
Maybe we should use another function than |
Well, we used to have |
This is tricky... I agree we shouldn't define the I do think we'll come across In TableTraitsUtils I now just special cased this, but that is of course more difficult without taking a direct dependency on DataValues.jl... But maybe there is a way to detect this case even with just the existing infrastructure? The core problem seems to be that we can't represent the equivalent of |
What's the advantage over returning |
…he normal convert-to-nondatavaluetype paradigm. Here, we call nondatavaluetype, and if the result is a different type, we know the value we're dealing w/ is a DataValue. We then call a new method, unwrap, if it's a DataValue, which has a special overload for Any. If it's not a DataValue type, no conversion is needed. Fixes #109
…he normal convert-to-nondatavaluetype paradigm. Here, we call nondatavaluetype, and if the result is a different type, we know the value we're dealing w/ is a DataValue. We then call a new method, unwrap, if it's a DataValue, which has a special overload for Any. If it's not a DataValue type, no conversion is needed. Fixes #109 (#110)
This is with v0.2.8:
Here column
a
should be of typeUnion{Any,Missing}
, notAny
, and the value in (1,1) should bemissing
, notNA
.The text was updated successfully, but these errors were encountered: