opencypher / openCypher

Specification of the Cypher property graph query language
http://www.opencypher.org
Apache License 2.0
841 stars 149 forks source link

Some CypherLists that are equal do not have the same hashcode #528

Closed mnd999 closed 2 years ago

mnd999 commented 2 years ago

On Scala 2.13, MurMurHash3 has changed it's contract to include the prefix in the hash calculation by default. This means that a CypherOrderedList and a CypherUnorderedList with the same content can be equal, but have different hashcodes. This breaks the equals / hashcode contract and is responsible for a TCK failure in Neo4j. Unfortunately, the mechanism for including or excluding the prefix does not exist in Scala 2.12, so to ensure we can still cross build I have to pull out Scala API version specific calls to MurMurHash3.

mnd999 commented 2 years ago

@hvub I added a comment to that effect. I don't know if that is better.

hvub commented 2 years ago

@mnd999 Oh yes. That is helpful enough without changing the actual code. Very good. Thanks.