Skip to content

Commit

Permalink
Delete redundant check to create edge schemas (#1444)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreylovitz committed Nov 22, 2020
1 parent eefb8ef commit 17663a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/execution_plan/ops/shared/create_functions.c
Expand Up @@ -5,6 +5,7 @@
*/

#include "create_functions.h"
#include "../../../RG.h"
#include "../../../errors.h"
#include "../../../query_ctx.h"

Expand Down Expand Up @@ -106,7 +107,7 @@ static void _CommitEdges(PendingCreations *pending) {
else destNodeID = ENTITY_GET_ID(Edge_GetDestNode(e));

Schema *schema = GraphContext_GetSchema(gc, e->relationship, SCHEMA_EDGE);
if(!schema) schema = GraphContext_AddSchema(gc, e->relationship, SCHEMA_EDGE);
ASSERT(schema); // All schemas have been created in the edge blueprint loop or earlier.
int relation_id = schema->id;

assert(Graph_ConnectNodes(g, srcNodeID, destNodeID, relation_id, e));
Expand Down

0 comments on commit 17663a6

Please sign in to comment.