alamb opened a new issue, #7193: URL: https://github.com/apache/arrow-datafusion/issues/7193
### Is your feature request related to a problem or challenge? https://github.com/apache/arrow-datafusion/pull/6936 from @izveigor added a really nice set of array functionality 🏆 to access individual array elements as well as ranges! However when I was testing the a bit of a mismatch in the `GetFieldAccess` struct which is now overloaded to return a named field in a struct, an element in a list or a range of a list. More commentary here https://github.com/apache/arrow-datafusion/pull/6936#discussion_r1283698897 You can see for example, the code to manipulate it here is pretty tricky: https://github.com/influxdata/influxdb_iox/pull/8419/files#diff-2ea572c49a95b9cbfa0647dbb38795bff1aa4dc788518bc8e83f80814f061b1f ### Describe the solution you'd like I think it would be a clearer API to separate out the FieldAccess for struct fields and `ListAccess` for list element acess Perhaps something like ```rust enum GetFieldAccess { /// returns the field `struct[field]`. For example `struct["name"]` NamedStructField { name: ScalarValue, }, /// single list index // list[i] ListIndex: { key: Expr }, /// list range `list[i:j]` ListIndex: { start: Expr stop: Expr }, } ``` ### Describe alternatives you've considered _No response_ ### Additional context _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
