Skip to main content

Module vector_primary

Module vector_primary 

Source
Expand description

Parse WITH (primary='vector', ...) options for CREATE COLLECTION DDL.

This module is concerned only with extracting and validating the vector-primary options from the raw SQL string. Column-level validation (e.g. that vector_field names an actual VECTOR(n) column) happens at the DDL execution layer where the column list is available.

Functions§

parse_vector_primary_options
Parse vector-primary options from raw CREATE COLLECTION SQL.
parse_vector_primary_options_from_kvs
Parse vector-primary options from pre-extracted (key, value) pairs.
validate_payload_indexes
Validate that each payload_indexes field exists, is not a VECTOR/BLOB/BYTES type, and is bitmap-eligible (text/int/bool/timestamp). Also infers the per-field PayloadIndexKind from the column type — numeric / timestamp → Range (sorted BTreeMap), bool → Boolean, everything else → Equality. Mutates cfg.payload_indexes to attach the inferred kinds.
validate_vector_field
Validate that vector_field names a VECTOR(n) column in the provided column list. Call this after the column list is available.