vlsi edited a comment on issue #1839: [CALCITE-3836] The hash codes of RelNodes 
are unreliable
URL: https://github.com/apache/calcite/pull/1839#issuecomment-595117753
 
 
   > liyafan82: So the hash code of an object may change
   > Vladimir: This is false
   > liyafan82: Would you please give some docs/link/code proving this?
   
   @liyafan82 , would you please provide docs/link/code instead?
   
   Here's the javadoc for 
[Object#hashCode](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--)
   
   >Whenever it is invoked on the same object more than once during an 
execution of a Java application, the hashCode method **_must consistently 
return the same integer_**
   
   It is sad your statement contradicts the very basic javadoc for 
`Object#hashCode`, and you ask others to prove something.
   It is you who should provide enough evidence to justify the bug exists.
   
   ---
   
   > liyafan82: So the hash code of an object may change
   
   Can you please provide a justification or a reproducible case instead?
   
   > liyafan82: Sorry. I do not understand why it violates the contract. Would 
you please elaborate more on this?
   
   Please check the javadoc for `Object#hashCode` and `#equals`. Please study 
https://jqno.nl/equalsverifier/ as well.
   

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


With regards,
Apache Git Services

Reply via email to