Current digests for RexNode, RelNode, RelType, and similar cases use String concatenation.
It is easy to implement, however, it has drawbacks:
1) String objects cannot be reused. For instance, RexCall has operands, however, the digest is duplicated. It causes extra memory use and extra CPU for string copying
2) There's no way to have multiple #toString() methods. RelType might need multiple digests: "including field names", "excluding field names".
A suggested resolution might be behind the lines of
Note how fields in Kotlin are aligned much better, and it makes it easier to read:
Then the digest for RexCall could be the bits relevant to RexCall itself + digests of the operands (which can be reused as is)
|Add benchmark test for new Digest interface||Open||