Skip to content

Commit 391ed3b

Browse files
DvirDukhanjeffreylovitzswilly22K-Jo
committed
Skip NULL-valued properties in bulk loader (#1108) (#1216)
* Add suppression for erroneous leak reports after DEBUG RELOAD (#1094) (#1210) (cherry picked from commit 386a8e6) Co-authored-by: Jeffrey Lovitz <[email protected]> * Update value.c (#1209) removed.boolean switch (cherry picked from commit e5ab233) Co-authored-by: Roi Lipman <[email protected]> * LabelScan with child reads data correctly after reset (#1086) (#1207) (cherry picked from commit cce2ebb) Co-authored-by: Jeffrey Lovitz <[email protected]> Co-authored-by: Roi Lipman <[email protected]> * Error properly on graph accesses of non-graph keys (#1069) (#1206) * Error properly on graph accesses of non-graph keys * Explicitly free QueryCtx on failed delete * Update cmd_delete.c Co-authored-by: Roi Lipman <[email protected]> (cherry picked from commit 0cf50df) Co-authored-by: Jeffrey Lovitz <[email protected]> Co-authored-by: Roi Lipman <[email protected]> * make memcheck rule prints full log for files with leaks (#1072) (#1205) Co-authored-by: Roi Lipman <[email protected]> (cherry picked from commit 135e0bc) Co-authored-by: Jeffrey Lovitz <[email protected]> Co-authored-by: Roi Lipman <[email protected]> * ReduceScan and ReduceTraversal respect variable scopes (#1070) (#1204) * ReduceScan and ReduceTraversal respect variable scopes * Fix source lookup * PR fixes Co-authored-by: Roi Lipman <[email protected]> (cherry picked from commit 29b75d8) Co-authored-by: Jeffrey Lovitz <[email protected]> Co-authored-by: Roi Lipman <[email protected]> * Better compile-time checking for undefined variables (#1063) (#1203) * Improve AST validations to capture undefined variables * Propagate errors in nested AR_EXP_Evaluate failures (cherry picked from commit e62b823) Co-authored-by: Jeffrey Lovitz <[email protected]> Co-authored-by: Roi Lipman <[email protected]> * add cloud link and NOT conditions unary validation (#1214) * Guarantee that NOT conditions are unary (#1092) (#1208) (cherry picked from commit b56f98a) Co-authored-by: Jeffrey Lovitz <[email protected]> Co-authored-by: Roi Lipman <[email protected]> * link to redis cloud Co-authored-by: Jeffrey Lovitz <[email protected]> Co-authored-by: Roi Lipman <[email protected]> Co-authored-by: Pieter Cailliau <[email protected]> * Bidirectional expand into (#1047) * wip * Remove unnecessary iterator * WIP * Fix bidirectional ExpandInto, shared edge populating logic * PR fixes * Post-rebase fixes * Fix PR comments (cherry picked from commit d46c6b6) * Skip NULL-valued properties in bulk loader (#1108) * Skip NULL-valued properties in bulk loader * Address PR comment, add missing logic in edge procesing (cherry picked from commit b62e802) * do not propagate transpose effect when introducing a transpose operation, maintain expression structure (#1102) (cherry picked from commit d6d6f8b) * added params support to id seek (#1164) (#1218) * added params support to id seek * reduce to scalar with runtime * fixed PR comments * fixed PR comments (cherry picked from commit bc609c3) * Move index iterator construction to first Consume call (#1169) (#1219) * Move index iterator construction to first Consume call * Address PR comments Co-authored-by: Roi Lipman <[email protected]> (cherry picked from commit 7853153) Co-authored-by: Jeffrey Lovitz <[email protected]> Co-authored-by: Roi Lipman <[email protected]> Co-authored-by: Jeffrey Lovitz <[email protected]> Co-authored-by: Roi Lipman <[email protected]> Co-authored-by: Pieter Cailliau <[email protected]>
1 parent 032b991 commit 391ed3b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/bulk_insert/bulk_insert.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ static inline SIValue _BulkInsert_ReadProperty(const char *data, size_t *data_id
6868
TYPE t = data[*data_idx];
6969
*data_idx += 1;
7070
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
7371
v = SI_NullVal();
7472
} else if(t == BI_BOOL) {
7573
bool b = data[*data_idx];
@@ -108,6 +106,9 @@ int _BulkInsert_ProcessNodeFile(RedisModuleCtx *ctx, GraphContext *gc, const cha
108106
Graph_CreateNode(gc->g, label_id, &n);
109107
for(unsigned int i = 0; i < prop_count; i++) {
110108
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;
111112
GraphEntity_AddProperty((GraphEntity *)&n, prop_indicies[i], value);
112113
}
113114
}
@@ -144,6 +145,9 @@ int _BulkInsert_ProcessRelationFile(RedisModuleCtx *ctx, GraphContext *gc, const
144145
// Process and add relation properties
145146
for(unsigned int i = 0; i < prop_count; i ++) {
146147
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;
147151
GraphEntity_AddProperty((GraphEntity *)&e, prop_indicies[i], value);
148152
}
149153
}

0 commit comments

Comments
 (0)