-
Notifications
You must be signed in to change notification settings - Fork 70
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
Expose named_struct in python #692
Labels
enhancement
New feature or request
Comments
Michael-J-Ward
added a commit
to Michael-J-Ward/datafusion-python
that referenced
this issue
May 15, 2024
andygrove
pushed a commit
that referenced
this issue
May 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently we can only create a struct of expressions using
datafusion.functions.struct
which assigns fixed field names of c0, c1, and so on. This is difficult to work with. In the rust implementation there is anamed_struct
function which would serve the purpose.Describe the solution you'd like
In an ideal world, the name of the field in a struct would come from the name of the expression. It would be great to do something like
And then the struct would contain field names
a
,b
, andc
.From a brief look at the code this may not be simple to implement. If that is not feasible, I would at least like to expose the
named_struct
function in the python code.Describe alternatives you've considered
No additional alternatives I have considered beyond the two described above.
Additional context
Minimal example showing current state:
Creates
The text was updated successfully, but these errors were encountered: