@@ -669,11 +669,11 @@ InitVisited(char *base, visited_hash * v, Relation index, int ef, int m)
669
669
* Add to visited
670
670
*/
671
671
static inline void
672
- AddToVisited (char * base , visited_hash * v , HnswCandidate * hc , Relation index , bool * found )
672
+ AddToVisited (char * base , visited_hash * v , HnswElementPtr elementPtr , Relation index , bool * found )
673
673
{
674
674
if (index != NULL )
675
675
{
676
- HnswElement element = HnswPtrAccess (base , hc -> element );
676
+ HnswElement element = HnswPtrAccess (base , elementPtr );
677
677
ItemPointerData indextid ;
678
678
679
679
ItemPointerSet (& indextid , element -> blkno , element -> offno );
@@ -682,21 +682,21 @@ AddToVisited(char *base, visited_hash * v, HnswCandidate * hc, Relation index, b
682
682
else if (base != NULL )
683
683
{
684
684
#if PG_VERSION_NUM >= 130000
685
- HnswElement element = HnswPtrAccess (base , hc -> element );
685
+ HnswElement element = HnswPtrAccess (base , elementPtr );
686
686
687
- offsethash_insert_hash (v -> offsets , HnswPtrOffset (hc -> element ), element -> hash , found );
687
+ offsethash_insert_hash (v -> offsets , HnswPtrOffset (elementPtr ), element -> hash , found );
688
688
#else
689
- offsethash_insert (v -> offsets , HnswPtrOffset (hc -> element ), found );
689
+ offsethash_insert (v -> offsets , HnswPtrOffset (elementPtr ), found );
690
690
#endif
691
691
}
692
692
else
693
693
{
694
694
#if PG_VERSION_NUM >= 130000
695
- HnswElement element = HnswPtrAccess (base , hc -> element );
695
+ HnswElement element = HnswPtrAccess (base , elementPtr );
696
696
697
- pointerhash_insert_hash (v -> pointers , (uintptr_t ) HnswPtrPointer (hc -> element ), element -> hash , found );
697
+ pointerhash_insert_hash (v -> pointers , (uintptr_t ) HnswPtrPointer (elementPtr ), element -> hash , found );
698
698
#else
699
- pointerhash_insert (v -> pointers , (uintptr_t ) HnswPtrPointer (hc -> element ), found );
699
+ pointerhash_insert (v -> pointers , (uintptr_t ) HnswPtrPointer (elementPtr ), found );
700
700
#endif
701
701
}
702
702
}
@@ -738,7 +738,7 @@ HnswLoadUnvisitedFromMemory(char *base, HnswElement element, HnswElement * unvis
738
738
HnswCandidate * hc = & neighborhood -> items [i ];
739
739
bool found ;
740
740
741
- AddToVisited (base , v , hc , NULL , & found );
741
+ AddToVisited (base , v , hc -> element , NULL , & found );
742
742
743
743
if (!found )
744
744
unvisited [(* unvisitedLength )++ ] = HnswPtrAccess (base , hc -> element );
@@ -820,7 +820,7 @@ HnswSearchLayer(char *base, Datum q, List *ep, int ef, int lc, Relation index, F
820
820
bool found ;
821
821
HnswPairingHeapNode * node ;
822
822
823
- AddToVisited (base , & v , hc , index , & found );
823
+ AddToVisited (base , & v , hc -> element , index , & found );
824
824
825
825
node = CreatePairingHeapNode (hc );
826
826
pairingheap_add (C , & node -> c_node );
0 commit comments