belugabehr commented on PR #3175:
URL: https://github.com/apache/avro/pull/3175#issuecomment-2372775682

   Hello,
   
   Thank you for the feedback. I agree a unit test is appropriate here.
   
   Ideally, the hashcode implementation should return the same value for the 
same contents regardless on the size of the array. However, that is not 
currently the case because the two implementations are different.  I believe 
AVRO-4061 will fix the discrepancy between the two implementations and then 
this unit test becomes possible.
   
   I also need to look at the `setLength` method. It's very confusing to me. If 
the buffer is made smaller, then the underlying string is truncated, if the 
buffer is made larger, than the underlying string is padded with zero (it's not 
just that the buffer is expanded). I don't really understand the use case of 
this method just yet. I feel like it shouldn't bother copying anything into the 
newly sized array since the end result is somewhat confusing.


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