danny0405 commented on a change in pull request #1281: [CALCITE-3149]
RelDataType CACHE in RelDataTypeFactoryImpl can't be garbage collected
URL: https://github.com/apache/calcite/pull/1281#discussion_r298469347
##########
File path:
core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFactoryImpl.java
##########
@@ -347,7 +350,7 @@ public RelDataType createTypeWithNullability(
* @throws NullPointerException if type is null
*/
protected RelDataType canonize(final RelDataType type) {
- return CACHE.getUnchecked(type);
Review comment:
I also that there is another issue
https://github.com/apache/calcite/commit/de9a7164b2d3e5a1637254fd0d54c7a4c886166e
which is also fixed by you, so the the CACHE pattern seems very much prone to
misused, can we have some protection that on other misuse code happens again ?
----------------------------------------------------------------
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]
With regards,
Apache Git Services