Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2632

Add hashCode and equals implementations to RexNode

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.18.0
    • None
    • None

    Description

      Right now RexNode doesn't have any equals or hashCode functions; which makes it rely on the default implementation.

      But when we are writing simplification logics we sometimes forget to use toString() during comparisions and may try to rely on pure equals:

      • there is a Set of RexNode-s during AND simplification and in RexUtil as well
      • I've by mistake just written rexNode.equals(otherRexNode) during the implementation of CALCITE-1413
      • I've just bumped into the same thing...that RexUtil.andNot is also rely on it....and I think those comparisions go back a while (~3years at least) ; and a bug is not appeared from it because this comparision is in most cases false.

      Attachments

        Issue Links

          Activity

            People

              kgyrtkirk Zoltan Haindrich
              kgyrtkirk Zoltan Haindrich
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: