Skip to content

Commit e355a79

Browse files
committed
Use capacity for default value computation
As the size is now the nodeCount and not the number of values set.
1 parent 09a575e commit e355a79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/org/neo4j/gds/core/loading/nodeproperties/LongNodePropertiesBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public NodePropertyValues build(long size, PartialIdMap idMap, long highestOrigi
128128

129129
var propertyValues = propertiesByMappedIdsBuilder.build();
130130

131-
var maybeMaxValue = size > 0
131+
var maybeMaxValue = propertyValues.capacity() > 0
132132
? OptionalLong.of((long) MAX_VALUE.getVolatile(LongNodePropertiesBuilder.this))
133133
: OptionalLong.empty();
134134

0 commit comments

Comments
 (0)