@@ -1301,9 +1301,16 @@ void vertex_scan_rescan(TableScanDesc scan, struct ScanKeyData *key,
13011301bool vertex_scan_getnextslot (TableScanDesc sscan , ScanDirection direction ,
13021302 TupleTableSlot * slot ) {
13031303 VertexScanDescData * vertex_desc = sscan ;
1304- TableAmRoutine * tableam = GetHeapamTableAmRoutine ();
13051304
1305+
1306+ if (vertex_desc -> rs_base .rs_nkeys != 1 )
13061307 ereport (WARNING ,errmsg_internal ("here" ));
1308+ else
1309+ ereport (WARNING ,errmsg_internal ("there" ));
1310+
1311+
1312+ TableAmRoutine * tableam = GetHeapamTableAmRoutine ();
1313+
13071314 return tableam -> scan_getnextslot (vertex_desc -> desc [0 ], direction , slot );
13081315
13091316 VertexHeapScanDesc so = (VertexHeapScanDesc ) sscan ;
@@ -2784,18 +2791,18 @@ vertex_hash_doinsert(Relation rel, HeapTuple itup, Relation heapRel)
27842791}
27852792
27862793#include "executor/nodeSeqscan.h"
2787-
2794+ #include "utils/ag_cache.h"
27882795static exec_seq_scan_scan_key_hook_type prev_exec_seq_scan_scan_key_hook = NULL ;
27892796
27902797void postgraph_seq_scan_key_hook (SeqScanState * node ,
27912798 int * numScanKeys , ScanKey scanKeys ) {
27922799
2793- ereport (WARNING , errmsg ("In hook" ));
2794-
2795- vertex_exec_index_build_ScanKeys (node , node -> ss .ss_currentRelation ,
2796- node -> ss .ps .plan -> qual ,
2797- scanKeys , numScanKeys );
27982800
2801+ label_cache_data * lcd = search_label_vertex_adjlist_cache (RelationGetRelid (node -> ss .ss_currentRelation ));
2802+ if (lcd ) {
2803+ ereport (WARNING , errmsg ("Found an edge scan" ));
2804+ vertex_exec_index_build_ScanKeys (node , node -> ss .ss_currentRelation , node -> ss .ps .plan -> qual , scanKeys , numScanKeys );
2805+ }
27992806 return ;
28002807}
28012808
0 commit comments