Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.39.0
-
None
Description
SqlTypeFactoryImpl#leastRestrictive method creates non-canonical types when it passes through:
- leastRestrictiveArrayMultisetType
- leastRestrictiveMapType
The behavior violates the contract of the RelDataTypeFactory (see below) and creates problems since many places in the code compare RelDataType and rely on the object equality.
The Javadoc of the RelDataTypeFactory states the following:
* Any implementation of <code>RelDataTypeFactory</code> must ensure that type * objects are canonical: two types are equal if and only if they are * represented by the same Java object. This reduces memory consumption and * comparison cost.
Attachments
Issue Links
- Discovered while testing
-
HIVE-27102 Upgrade Calcite to 1.33.0 and Avatica to 1.23.0
-
- Resolved
-
- is caused by
-
CALCITE-4603 Least restrictive type considers only the last element in collections of collections
-
- Closed
-
- links to