-
Notifications
You must be signed in to change notification settings - Fork 933
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
[BUG] make_empty_column produces a dictionary column in an invalid state #18071
Comments
@davidwendt I'm happy to open a PR with a fix if you can advise on what makes the most sense here. |
Should I be concerned that we are suddenly trying to use dictionary types? Accessing children of an empty compound column (one with potential children) is considered UB. The following will also segfault:
|
Attempting to fix this here #18121 |
Thank you! |
Describe the bug
Currently running the following two lines will produce a segmentation fault:
The reason for this is that when producing an empty column the
make_empty_column
function does not produce any children for the column, resulting in a null pointer dereference on theindices()
call.In principle, the function protects against this class of error by explicitly opting out of supporting nested column types. However, dictionary types are not considered nested by the
is_nested
trait.Expected behavior
This code should either succeed or fail gracefully, not seg fault.
Additional context
The two obvious options for solutions would be to add dictionary types to
is_nested
or to manually disable them in the factory function. Naively I would opt for the former, but I suspect that would violate expectations in other parts of the code. I unfortunately don't know the dictionary code very well.The text was updated successfully, but these errors were encountered: