jorgecarleitao commented on pull request #9440: URL: https://github.com/apache/arrow/pull/9440#issuecomment-779592089
@tyrelr , thanks a lot for bringing this forward. In general, think that such a trait is difficult given how heterogeneous its return types are: `value()` can return: * A value, for primitives and bool * A slice, for binary and string * A trait object for `List` * a vector of values, for `Struct` With that said, I think that there are 3 important use-cases for such a trait: * `HashableValue`: Currently we no mechanism to generically hash a value of an array. However, that came up a couple of times already in DataFusion and is a very central concept in any data structure (together with equality). In this context, it could be interesting to explore this. * `serve::Value`: we currently implement the `serde::Value` at `ArrowNativeType`, but in principle each array should know how to present itself as a json, so that we support `value(i) -> Value`. * `String`: in principle every value should be representable as a string. We could offer a trait for that. Just some ideas. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
