@@ -68,8 +68,6 @@ static inline SIValue _BulkInsert_ReadProperty(const char *data, size_t *data_id
68
68
TYPE t = data [* data_idx ];
69
69
* data_idx += 1 ;
70
70
if (t == BI_NULL ) {
71
- // TODO This property will currently get entered with a NULL key.
72
- // Update so that the entire key-value pair is omitted from the node
73
71
v = SI_NullVal ();
74
72
} else if (t == BI_BOOL ) {
75
73
bool b = data [* data_idx ];
@@ -108,6 +106,9 @@ int _BulkInsert_ProcessNodeFile(RedisModuleCtx *ctx, GraphContext *gc, const cha
108
106
Graph_CreateNode (gc -> g , label_id , & n );
109
107
for (unsigned int i = 0 ; i < prop_count ; i ++ ) {
110
108
SIValue value = _BulkInsert_ReadProperty (data , & data_idx );
109
+ // Cypher does not support NULL as a property value.
110
+ // If we encounter one here, simply skip it.
111
+ if (SI_TYPE (value ) == T_NULL ) continue ;
111
112
GraphEntity_AddProperty ((GraphEntity * )& n , prop_indicies [i ], value );
112
113
}
113
114
}
@@ -144,6 +145,9 @@ int _BulkInsert_ProcessRelationFile(RedisModuleCtx *ctx, GraphContext *gc, const
144
145
// Process and add relation properties
145
146
for (unsigned int i = 0 ; i < prop_count ; i ++ ) {
146
147
SIValue value = _BulkInsert_ReadProperty (data , & data_idx );
148
+ // Cypher does not support NULL as a property value.
149
+ // If we encounter one here, simply skip it.
150
+ if (SI_TYPE (value ) == T_NULL ) continue ;
147
151
GraphEntity_AddProperty ((GraphEntity * )& e , prop_indicies [i ], value );
148
152
}
149
153
}
0 commit comments