From 09fbc13f54be7b94919393bc17885462f34deb56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Kie=C3=9Fling?= Date: Wed, 6 Mar 2024 13:00:18 +0100 Subject: [PATCH] Add RowDataBufferFactory and tests --- .../core/loading/construction/PropertyValues.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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)); + } } }