Exclude zero vectors for cosine distance to be consistent with other types [skip ci]

This commit is contained in:
Andrew Kane
2024-03-29 22:54:23 -07:00
parent 5da3bdf98e
commit cbcbebe52e
5 changed files with 35 additions and 6 deletions

View File

@@ -204,6 +204,10 @@ HnswNormValue(FmgrInfo *procinfo, Oid collation, Datum *value, HnswType type)
*value = PointerGetDatum(result);
}
else if (type == HNSW_TYPE_INTVEC)
{
/* Do nothing */
}
else
elog(ERROR, "Unsupported type");