I am not familiar with this specific part of the code, and it's a bit difficult to understand the flow without a reproduction that I can run in the debugger. >From reading the code and your description you seem to imply that the interner >does not return a type that is equivalent to the canonical representation of >the interned type. That sounds very much like a bug. It may be worth a new >issue.
Mihai ________________________________ From: Zhe Hu <[email protected]> Sent: Saturday, December 2, 2023 9:12 PM To: [email protected] <[email protected]> Subject: JavaType with charset Hi, community. Recently, when I try to fix CALCITE-6146, I’ve find something confusing about createTypeWithCharsetAndCollation() method in SqlTypeFactoryImpl. I want to create a new RelDataType with different charset(for deriving type in CONVERT function) based on a JavaType like “JavaType(class java.lang.String)”, however, the cached type in DATATYPE_CACHE will be returned, which means I cannot get a JavaType with the specific charset. I'm considering whether adding the charset name for JavaType’s digest is the right way to go. Appreciate any suggestions. Best, ZheHu
