Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
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
- duplicates
-
CALCITE-1367 Implement equals and hashCode for all sub-classes of RexNode
- Closed
- links to