Technically speaking, I would love to refrain from using toString for equals/hashCode, however, it looks like a much more invasive change.
Yet another idea is to skip normalization when rendering a plan with SqlExplainLevel != DIGEST_ATTRIBUTES. In other words, the normalization is there, it is on by default, however, it is deactivated for rendering the plans. Unfortunately, that results in adding public methods and a thread-local, however, we could mark it as a Calcite-internal or so. I've updated https://github.com/apache/calcite/pull/1703 accordingly. Vladimir
