From c75634a03cdf1b64d4119d1f4b855e31b5a53c67 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Mon, 1 Apr 2024 22:31:02 -0700 Subject: [PATCH] Fixed type check [skip ci] --- src/hnswutils.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/hnswutils.c b/src/hnswutils.c index 0c828ae..4b259fc 100644 --- a/src/hnswutils.c +++ b/src/hnswutils.c @@ -150,11 +150,16 @@ HnswOptionalProcInfo(Relation index, uint16 procnum) } /* - * Get vector type + * Get type */ HnswType HnswGetType(Relation index) { + Oid typid = TupleDescAttr(index->rd_att, 0)->atttypid; + + if (typid == BITOID || typid == VARBITOID) + return HNSW_TYPE_BIT; + return HNSW_TYPE_VECTOR; }