-
Notifications
You must be signed in to change notification settings - Fork 867
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
Add column_by_name() for RecordBatch #3448
Comments
Makes sense to me |
I'll pick this up. Edit: I'll work on |
I don't think we can return Option (or Result) from
So the behavior of Below are the return types I am planning. Let me know if you have alternate suggestion.
|
This is done and can be closed, right? |
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
This is quite verbose:
Describe the solution you'd like
The simplest option is to add
column_by_name()
forRecordBatch
. It is already implemented forStructArray
.But it might also be desirable to implement std::ops::Index for
RecordBatch
:Describe alternatives you've considered
Additional context
I was working with highly nested schemas with multiple levels of StructArrays in some unit tests, and it was a little annoying to access those deep fields. In an ideal world, I might be able to do something along the lines of:
This implies
StructArray
would implementIndex
in the same way thatRecordBatch
does. If we wanted to get fancy, it might not be crazy to implement this forListArray
or evenMapArray
.The text was updated successfully, but these errors were encountered: