Class VectorType

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

public class VectorType extends DataType
Snowflake's VECTOR(element_type, dimension) type; values are VectorValue.

The ELEMENT TYPE and the DIMENSION are both part of the type's identity, and Snowflake checks them at COMPILE time: live-verified, VECTOR_COSINE_SIMILARITY([1,2]::VECTOR(FLOAT,2), [1,2,3]::VECTOR(FLOAT,3)) fails "Invalid argument types for function 'VECTOR_COSINE_SIMILARITY': (VECTOR(FLOAT, 2), VECTOR(FLOAT, 3))", as does mixing VECTOR(FLOAT,3) with VECTOR(INT,3). That is why getName() renders the full parameterization — the error quotes it verbatim — and why equals(java.lang.Object) compares both parameters.

See Also: