-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Union types not handled when building AnalysisContext::try_from_column
#8499
Comments
cc @Dandandan |
There is a similar report in #8262 (related to |
With the new design of statistics underway, this problem may be resolved by simply using an absent interval. Unless it's an emergency, I don't think we should apply a temporary patch to the analysis context. It would be better to add missing scalar value variants. |
Yeah, I agree. I think adding the missing scalar value variants is probably the better approach either way as there are probably other contexts where it would be useful to have them |
Describe the bug
AnalysisContext
will try and create aScalarValue
when there are no statistics for a given column. Since there is noScalarValue
representation for union types this fails.The constructor is fallible so this isn't a bug per se, but in other contexts this value is unwrapped and can cause panics during query planning
To Reproduce
Minimized example of what we have observed causing panics during query planning:
Since
FilterExec::equivalence_properties
unwraps the result ofFilterExec::statistics
this just panics.Expected behavior
FilterExec::equuivalence_properties
is infallible so it shouldn't panic :)Additional context
There is probably a way to patch this but seems like we should just add a
ScalarValue::Union
variant.The text was updated successfully, but these errors were encountered: