I agree that extensibility might be helpful, however:

1) I do not like the idea of XOR-based hash code, because it would make
($1=$1) have the same hashcode as ($2=$2) and so on.
2) "$2 > $1 is reordered to  $1 < $2, so that predicate a > b and b < a can
be reduced to a > b."
This reverting can easily happen as rule does its transformations (e.g.
swap join order and so on).
That is why ability to normalize < into > helps like it helps for $1=$2 vs
$2=$1

>when just computing the hash code?

What I do not like with the current code is it does perform
compute-intensive operations when calling equals.
Previous code (the one from CALCITE-2450) never computed the normalization
multiple times per RexNode.
It looks like now we losing that feature.

Vladimir

Reply via email to