Skip to content

HNSW SQL Support Part 1#16

Merged
normen662 merged 3 commits into
normen662:hnsw-pocfrom
hatyo:hnsw-sql
Aug 13, 2025
Merged

HNSW SQL Support Part 1#16
normen662 merged 3 commits into
normen662:hnsw-pocfrom
hatyo:hnsw-sql

Conversation

@hatyo

@hatyo hatyo commented Aug 13, 2025

Copy link
Copy Markdown

This adds SQL support for creating a table organized by HNSW, the following syntax is introduced

create table photos(zone string, recordId string, embedding vector(768), 
primary key (zone, recordId), 
organized by hnsw(embedding partition by zone) with (hnsw_m = 10, hnsw_ef_construction = 5))

It also adds support to vector data type, with various supported precisions and arbitrary size, the following versions are supported:

VECTOR(size)
VECTOR16(size)
VECTOR32(size)
VECTOR64(size)
FLOATVECTOR(size)
DOUBLEVECTOR(size)
HALFVECTOR(size)

under the hood, the vector is stored as a normal bytes array. The precision and size information are mere metadata artifacts.

@normen662 normen662 merged commit 8de8097 into normen662:hnsw-poc Aug 13, 2025
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants