Package dev.frostlake.types
Class MapType
java.lang.Object
dev.frostlake.types.DataType
dev.frostlake.types.MapType
- All Implemented Interfaces:
Serializable
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformatValue(Object value) getCommonType(DataType other) intgetSize()booleanisCompatible(DataType other) parseValue(String value) toString()Methods inherited from class dev.frostlake.types.DataType
equals, getCategory, getName, hashCode
-
Constructor Details
-
MapType
-
-
Method Details
-
getKeyType
-
getValueType
-
parseValue
- Specified by:
parseValuein classDataType
-
formatValue
- Specified by:
formatValuein classDataType
-
isCompatible
- Specified by:
isCompatiblein classDataType
-
getCommonType
- Specified by:
getCommonTypein classDataType
-
getSize
public int getSize() -
toString
-