danny0405 opened a new pull request #1942:
URL: https://github.com/apache/calcite/pull/1942
Current interning of types use weak references.
Change from MUST intern to SHOULD intern, and always
compare types using equals.
We clearly want to do some interning, especially within a query, so that
there aren't hundreds of copies of the same record type all over the
place. But if people don't intern, or intern in different query-specific
caches, then the logic will still work.
If equals is written using the standard template
```java
return this == o
|| o instanceof TheType && field1 == o.field1 && field2 == o.field2
```
(that is, avoiding deep comparison if possible) then the performance
will be pretty much the same.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]