Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
This seems caused by CALCITE-4546 (fbbdf46)
JaninoRelMetadataProvider lines 135 & 141 is using (for the generated code) the hardcoded name of the class MetadataDef:
buff.append(" private final org.apache.calcite.rel.metadata.MetadataDef def;\n"); for (Map.Entry<MetadataHandler<?>, String> handlerAndName : handlerToName.entrySet()) { ... .append(" org.apache.calcite.rel.metadata.MetadataDef def");
This can lead to issues (e.g. if a downstream project shades Calcite library). The safer way to do this is using Class#getName, as it is already done in the rest of the code, e.g. in JaninoRelMetadataProvider:158:
.append(MetadataDef.class.getName())
Attachments
Issue Links
- is caused by
-
CALCITE-4546 Change metadata dispatch to avoid registration of all RelNode subtypes
- Closed
- links to