-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
better upper bounds in apply_type_tfunc for NamedTuple #32699
Comments
How can I help here? I know basically no C++ or Scheme but willing to learn. I'd really like to be able to use vanilla NamedTuples in LightQuery |
Note that @JeffBezanson and I had a quick chat about this offline and #33326 currently takes priority to improve compiler times before we add a bit more work for it. |
@JeffBezanson sorry to bother you but looking for an update here. I was considering moving LightQuery over to using Base NamedTuples in hopes that some day performance issues will be resolved. Is that likely to happen at some point? |
Yay!!! I've been playing around with this and it's working great. I'm running into problems with pairs, though? Which is inconvenient because keyword arguments get passed through pairs?
|
Nope, nevermind I don't think pairs the problem I hit. Instead, I'm having trouble merging in new (unstable) fields based on old (unstable) fields.
|
And also, that propertynames for NamedTuples isn't pure. Given that they are encoded in the type for named tuples and part of the public interface, it seems like it might be a reasonable thing to do. |
Well anyways, the master version of LightQuery uses Base named tuples. It is a lot more convenient to use for sure. But benchmarking seems to show that performance goes out the window once you add a column with an unstable eltype. |
Should I open an issue for the merge problem? |
Here's an example where the resulting
NamedTuple{names, _A) where _A
type is not ideal since it completely discards valid information up to that point.@JeffBezanson thought it should be valid/fine to include an upper bound here, so that we end up with
NamedTuple{(:id, :y), _A} where _A <: Tuple{Int64, Union{Missing, Float64}
The text was updated successfully, but these errors were encountered: