Class MapType

java.lang.Object
dev.frostlake.types.DataType
dev.frostlake.types.MapType
All Implemented Interfaces:
Serializable

public class MapType extends DataType
The structured MAP(keyType, valueType) type. Object-backed at runtime but a type of its OWN — it is deliberately NOT an ObjectType subclass, because the MAP-strict argument family rejects an ObjectType argument and a MAP must stay accepted there.

Snowflake groups MAP with structured OBJECT for cast purposes (both are STRUCTURED_OBJECT): live, CAST(<OBJECT(x VARCHAR)> AS MAP(VARCHAR,VARCHAR) RENAME FIELDS) succeeds while CAST(<ARRAY(INT)> AS OBJECT(x INT) RENAME FIELDS) fails "incompatible types: [STRUCTURED_ARRAY] and [STRUCTURED_OBJECT]".

See Also: