diff --git a/core/src/main/java/org/neo4j/gds/core/loading/construction/PropertyValues.java b/core/src/main/java/org/neo4j/gds/core/loading/construction/PropertyValues.java index 21e0dbca2e..26bb98e65b 100644 --- a/core/src/main/java/org/neo4j/gds/core/loading/construction/PropertyValues.java +++ b/core/src/main/java/org/neo4j/gds/core/loading/construction/PropertyValues.java @@ -37,6 +37,8 @@ public abstract class PropertyValues { public abstract Iterable propertyKeys(); + public abstract Value get(String key); + public static PropertyValues of(MapValue mapValue) { return new CypherPropertyValues(mapValue); } @@ -71,6 +73,11 @@ public int size() { public Set propertyKeys() { return this.properties.keySet(); } + + @Override + public Value get(String key) { + return properties.get(key); + } } private static final class CypherPropertyValues extends PropertyValues { @@ -101,5 +108,10 @@ public int size() { public Iterable propertyKeys() { return this.properties.keySet(); } + + @Override + public Value get(String key) { + return ValueConverter.toValue(properties.get(key)); + } } }