lidavidm commented on pull request #7224: URL: https://github.com/apache/arrow/pull/7224#issuecomment-631428845
I could take a different approach and only expose bytes, but internally check if there is/isn't the "-bin" suffix and use the appropriate marshaller - does that sound better? It would be somewhat inefficient, as the user would convert strings to bytes only to have us convert them back to strings. Unfortunately gRPC enforces that string keys must be read/set as strings and bytes keys must be read/set as bytes. It doesn't literally duplicate methods, but it effectively does by using generic parameters/typed key objects. `ErrorFlightMetadata` is different - a gRPC `Metadata` object actually has an implicit lifetime (you can't use it outside of the interceptor method where you received it), so we can't just wrap `Metadata`. And on the other hand, we _do_ want to wrap `Metadata` in middleware because we'd like to mutate the underlying object. ---------------------------------------------------------------- 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]
