Skip to content

Commit

Permalink
Skip NULL-valued properties in bulk loader (#1108) (#1216)
Browse files Browse the repository at this point in the history
* Add suppression for erroneous leak reports after DEBUG RELOAD (#1094) (#1210)

(cherry picked from commit 386a8e6)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>

* Update value.c (#1209)

removed.boolean switch

(cherry picked from commit e5ab233)

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* LabelScan with child reads data correctly after reset (#1086) (#1207)

(cherry picked from commit cce2ebb)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* 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 <swilly22@users.noreply.github.com>
(cherry picked from commit 0cf50df)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* make memcheck rule prints full log for files with leaks (#1072) (#1205)

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 135e0bc)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* ReduceScan and ReduceTraversal respect variable scopes (#1070) (#1204)

* ReduceScan and ReduceTraversal respect variable scopes

* Fix source lookup

* PR fixes

Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
(cherry picked from commit 29b75d8)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* 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 <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* 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 <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

* link to redis cloud

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
Co-authored-by: Pieter Cailliau <pieter.cailliau@gmail.com>

* 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 <swilly22@users.noreply.github.com>
(cherry picked from commit 7853153)

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>

Co-authored-by: Jeffrey Lovitz <jeffrey.lovitz@gmail.com>
Co-authored-by: Roi Lipman <swilly22@users.noreply.github.com>
Co-authored-by: Pieter Cailliau <pieter.cailliau@gmail.com>
  • Loading branch information
4 people committed Jul 15, 2020
1 parent 032b991 commit 391ed3b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/bulk_insert/bulk_insert.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ static inline SIValue _BulkInsert_ReadProperty(const char *data, size_t *data_id
TYPE t = data[*data_idx];
*data_idx += 1;
if(t == BI_NULL) {
// TODO This property will currently get entered with a NULL key.
// Update so that the entire key-value pair is omitted from the node
v = SI_NullVal();
} else if(t == BI_BOOL) {
bool b = data[*data_idx];
Expand Down Expand Up @@ -108,6 +106,9 @@ int _BulkInsert_ProcessNodeFile(RedisModuleCtx *ctx, GraphContext *gc, const cha
Graph_CreateNode(gc->g, label_id, &n);
for(unsigned int i = 0; i < prop_count; i++) {
SIValue value = _BulkInsert_ReadProperty(data, &data_idx);
// Cypher does not support NULL as a property value.
// If we encounter one here, simply skip it.
if(SI_TYPE(value) == T_NULL) continue;
GraphEntity_AddProperty((GraphEntity *)&n, prop_indicies[i], value);
}
}
Expand Down Expand Up @@ -144,6 +145,9 @@ int _BulkInsert_ProcessRelationFile(RedisModuleCtx *ctx, GraphContext *gc, const
// Process and add relation properties
for(unsigned int i = 0; i < prop_count; i ++) {
SIValue value = _BulkInsert_ReadProperty(data, &data_idx);
// Cypher does not support NULL as a property value.
// If we encounter one here, simply skip it.
if(SI_TYPE(value) == T_NULL) continue;
GraphEntity_AddProperty((GraphEntity *)&e, prop_indicies[i], value);
}
}
Expand Down

0 comments on commit 391ed3b

Please sign in to comment.