Package dev.frostlake.types
Class StructuredTypes
java.lang.Object
dev.frostlake.types.StructuredTypes
Predicates and rendering shared by the STRUCTURED types (
StructuredObjectType,
StructuredArrayType, MapType).
Snowflake sorts these into two families for cast compatibility — STRUCTURED_OBJECT
(structured OBJECT and MAP) and STRUCTURED_ARRAY — and reports a cross-family cast as
"incompatible types: [STRUCTURED_ARRAY] and [STRUCTURED_OBJECT]" (live-verified).
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringA type as Snowflake spells it in an argument-type / cast error message.static StringfamilyName(DataType type) Snowflake's family label for a structured type, used verbatim in its cast error messages.static booleanisStructured(DataType type) Whethertypeis one of the STRUCTURED types (a declared shape, not plain OBJECT/ARRAY/VARIANT).static booleanWhethertypeis in Snowflake'sSTRUCTURED_OBJECTfamily (structured OBJECT or MAP).static booleansameBindingShape(DataType source, DataType target) Whether two types match for UDF ARGUMENT BINDING: the same structured layout and the same leaf type FAMILIES, ignoring length/precision.
-
Method Details
-
isStructured
Whethertypeis one of the STRUCTURED types (a declared shape, not plain OBJECT/ARRAY/VARIANT). -
isStructuredObjectFamily
Whethertypeis in Snowflake'sSTRUCTURED_OBJECTfamily (structured OBJECT or MAP). -
familyName
Snowflake's family label for a structured type, used verbatim in its cast error messages. -
sameBindingShape
Whether two types match for UDF ARGUMENT BINDING: the same structured layout and the same leaf type FAMILIES, ignoring length/precision. Live with a parameter declaredOBJECT(x VARCHAR): anOBJECT(x VARCHAR(10))argument binds, anOBJECT(x INT)argument fails "Invalid argument types", and so do a plainOBJECT, aVARIANT, anOBJECT(y VARCHAR)and a widerOBJECT(x VARCHAR, y INT). -
describe
A type as Snowflake spells it in an argument-type / cast error message.
-