Skip to content

Commit c487ccf

Browse files
committed
Native Graph Storage POC
And now the real work can begin! What has held this system back since it was called AgensGraph is now over. Graph Native Storage is no longer a dream.
1 parent edaa308 commit c487ccf

2 files changed

Lines changed: 4 additions & 17 deletions

File tree

src/backend/access/vertex_heap/vertex_heapam_handler.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ TableScanDesc vertex_scan_begin(Relation relation, Snapshot snapshot, int nkeys,
127127
vertex_desc->desc = palloc(sizeof (TableScanDesc *) * vertex_desc->ndesc);
128128
vertex_desc->isIndex = palloc(sizeof (bool) * vertex_desc->ndesc);
129129

130-
/*List *indexoidlist = RelationGetIndexList(relation);
130+
List *indexoidlist = RelationGetIndexList(relation);
131131
if(list_length(indexoidlist) == 1) {
132132
Oid idx = linitial_oid(indexoidlist);
133133

@@ -140,13 +140,13 @@ TableScanDesc vertex_scan_begin(Relation relation, Snapshot snapshot, int nkeys,
140140

141141
vertex_desc->desc[0] = desc;
142142
vertex_desc->isIndex[0] = true;
143-
} else {*/
143+
} else {
144144

145145
TableScanDesc *desc = tableam->scan_begin(rel, snapshot, nkeys, key, parallel_scan, flags);
146146

147147
vertex_desc->desc[0] = desc;
148148
vertex_desc->isIndex[0] = false;
149-
//}
149+
}
150150
return vertex_desc;
151151
}
152152

src/backend/utils/edge_searching.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,6 @@ static Datum get_vertex(Oid graph_oid, int64 graphid)
8888
PG_FUNCTION_INFO_V1(retrieve_vertex);
8989
Datum retrieve_vertex(PG_FUNCTION_ARGS) {
9090

91-
//PG_RETURN_POINTER(get_vertex(graph_oid, id));
92-
93-
//gtype *graph_oid = GT_ARG_TO_INT4_DATUM(0);
94-
//graphid id = AG_GETARG_GRAPHID(1);
95-
96-
//lquery *label = PG_GETARG_LQUERY_P(1);
97-
//bool include_props = PG_GETARG_BOOL(2);
9891
FuncCallContext *funcctx;
9992
if (SRF_IS_FIRSTCALL())
10093
{
@@ -132,12 +125,6 @@ Datum retrieve_vertex(PG_FUNCTION_ARGS) {
132125
}
133126

134127
SRF_RETURN_DONE(funcctx);
135-
136-
137-
138-
139-
140-
141128
}
142129

143130

@@ -189,7 +176,7 @@ Datum edge_search(PG_FUNCTION_ARGS)
189176

190177
Snapshot snapshot = GetActiveSnapshot();
191178

192-
ScanKeyInit(cxt->scanKey, Anum_ag_label_edge_table_start_id, BTEqualStrategyNumber, F_GRAPHIDEQ, GRAPHID_GET_DATUM(id));
179+
ScanKeyInit(cxt->scanKey, 1, HTEqualStrategyNumber, F_GRAPHIDEQ, GRAPHID_GET_DATUM(id));
193180

194181
cxt->rel = table_open(lcd->vertex_adjlist, ShareLock);
195182
cxt->scan_desc = table_beginscan(cxt->rel, snapshot, 1, cxt->scanKey);

0 commit comments

Comments
 (0)