erratic-pattern commented on issue #5731:
URL: https://github.com/apache/arrow-rs/issues/5731#issuecomment-2122988106

   I think this issue arises via a combination of factors:
   * some message types explicitly document that they should be `Any` wrapped
   * others do not document that they should be `Any` wrapped, but also don't 
recommend against it explicitly
   * client implementors therefore assumed, in absense of explicit 
documentation, that message types should be consistent with each other, but 
each implementor comes to a divergent conclusion about what that consistent 
message handling actually should be.
   
   My only preference is toward documenting what goes in `app_metadata` 
explicitly, or in the absence of such documentation, have consistent behavior 
between message types.  This would eliminate future ambiguity and make it 
unlikely for similar issues to happen.
   
   The problem with the current consensus of removing the `Any` wrapping  on 
this one particular message type is that there will be no consistency between 
different message types going forward. Each message type sort of arbitrarily 
specifies whether or not it has `Any` wrapping, and there is no particular 
rhyme or reason for why this should or shouldn't be the case. 
   
   Even if we go and explicitly document each and every message type with its 
unambiguous `Any` wrapping behavior, I don't see any clear *reason* for 
different message types to have different `Any` wrapping behavior in the first 
place. It seem arbitrary and based on historical precedent rather than 
explicitly designed with a purpose in mind. 
   
   This is a "path of least resistance" approach to making the minimal possible 
spec change, but ultimately makes the specification messy and thus harder to 
implement and maintain in the long term.
   
   So my recommendation would be to:
   1) Have a clear rationale for or against `Any` wrapping of message types
   2) make *all* `bytes`-encoded message types across the specification have 
consistent `Any` wrapping behavior, and document this *on the `bytes` field 
itself as well as the message types*,  **except** when there is a clear 
justification for why one message type should deviate. Document all such 
justification.
   
   


-- 
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]

Reply via email to