mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-11 23:26:55 +08:00
Use datumIsEqual to compare
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include "hnsw.h"
|
#include "hnsw.h"
|
||||||
#include "storage/bufmgr.h"
|
#include "storage/bufmgr.h"
|
||||||
|
#include "utils/datum.h"
|
||||||
#include "vector.h"
|
#include "vector.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -880,7 +881,7 @@ HnswFindDuplicate(HnswElement e)
|
|||||||
HnswCandidate *neighbor = &neighbors->items[i];
|
HnswCandidate *neighbor = &neighbors->items[i];
|
||||||
|
|
||||||
/* Exit early since ordered by distance */
|
/* Exit early since ordered by distance */
|
||||||
if (vector_cmp_internal(DatumGetVector(e->value), DatumGetVector(neighbor->element->value)) != 0)
|
if (!datumIsEqual(e->value, neighbor->element->value, false, -1))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* Check for space */
|
/* Check for space */
|
||||||
|
|||||||
Reference in New Issue
Block a user