eevanwong commented on pull request #2191:
URL: https://github.com/apache/drill/pull/2191#issuecomment-814914037


   Hey so, a bit of an update, for hash code and equals, tuns out you in fact 
do need both.
   
   > Yes, this is a legitimate concern. The contract between hashCode and 
equals is that equal instances must have the same hashCode. The reverse is not 
necessary, but high quality hashCode algorithms should avoid this as much as 
possible.
   
   According to javadoc for the equals method:
   
       Note that it is generally necessary to override the hashCode method 
whenever this method is overridden, so as to maintain the general contract for 
the hashCode method, which states that equal objects must have equal hash codes.
   
   Full javadoc is here: equals and hashCode.


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


Reply via email to