Skip to content

Commit

Permalink
fix(interactive): Fix NPE when update/delete vertices (alibaba#3250)
Browse files Browse the repository at this point in the history
  • Loading branch information
siyuan0322 committed Sep 22, 2023
1 parent bb91e5c commit fb27016
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ private void addDeleteVertexOperation(
Map<String, Object> properties = dataRecord.getProperties();
Map<Integer, PropertyValue> propertyVals = parseRawProperties(vertexDef, properties);
propertyVals.putAll(pkVals);
long hashId = getPrimaryKeysHashId(labelId, pkVals, vertexDef);
long hashId = getPrimaryKeysHashId(labelId, propertyVals, vertexDef);
batchBuilder.addOperation(
new DeleteVertexOperation(new VertexId(hashId), new LabelId(labelId)));
}
Expand All @@ -273,7 +273,7 @@ private void addUpdateVertexOperation(
Map<String, Object> properties = dataRecord.getProperties();
Map<Integer, PropertyValue> propertyVals = parseRawProperties(vertexDef, properties);
propertyVals.putAll(pkVals);
long hashId = getPrimaryKeysHashId(labelId, pkVals, vertexDef);
long hashId = getPrimaryKeysHashId(labelId, propertyVals, vertexDef);
batchBuilder.addOperation(
new UpdateVertexOperation(
new VertexId(hashId), new LabelId(labelId), propertyVals));
Expand Down

0 comments on commit fb27016

Please sign in to comment.