You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/06/22 22:21:44 UTC

[GitHub] [calcite] hsyuan opened a new pull request #2041: [CALCITE-4083] RelTraitSet failed to canonize traits

hsyuan opened a new pull request #2041:
URL: https://github.com/apache/calcite/pull/2041


   RelTraitSet#plus uses FlatLists and ImmutableList. They have different hash
   algorithms, and they are all different classes from RelTraitSet. The
   RelTraitSet equality requires the other object must be RelTraitSet too, and the
   HashMap#get(key) uses key.equals() to check equality, instead of the other way.
   In case we pass RelTraitSet as the search key to cache, but the cached entry
   has key with FlatLists or ImmutableList, we may fail to find the cached
   RelTraitSet. Due to this, using == to check traitSet equality may fail, even
   they have same traits.
   
   Also modified hashCode() of RelDataTypeFieldImpl, the original implementation
   generates hash collision easily.
   
   CALCITE-4083


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [calcite] hsyuan closed pull request #2041: [CALCITE-4083] RelTraitSet failed to canonize traits

Posted by GitBox <gi...@apache.org>.
hsyuan closed pull request #2041:
URL: https://github.com/apache/calcite/pull/2041


   


----------------------------------------------------------------
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:
users@infra.apache.org