Skip to content

Commit 0b96581

Browse files
authored
Merge pull request #11248 from DarthMax/generic_result_store_entry
GDSA-343 Table Result store entry
2 parents 0d06128 + 2740998 commit 0b96581

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

core-api/src/main/java/org/neo4j/gds/api/ResultStoreEntry.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.neo4j.gds.api.properties.nodes.NodePropertyValues;
2424

2525
import java.util.List;
26+
import java.util.function.Function;
2627
import java.util.function.LongUnaryOperator;
2728
import java.util.stream.Stream;
2829

@@ -57,6 +58,8 @@ T relationshipIterators(
5758
LongUnaryOperator toOriginalId,
5859
long nodeCount
5960
);
61+
62+
T tableEntry(long rows, List<String> columns, List<ValueType> valueTypes, List<Function<Long, Object>> valueProducers);
6063
}
6164

6265
record NodeLabel(String nodeLabel, long nodeCount, LongUnaryOperator toOriginalId) implements ResultStoreEntry {
@@ -135,4 +138,21 @@ public <T> T accept(Visitor<T> visitor) {
135138
);
136139
}
137140
}
141+
142+
record TableEntry(
143+
long rows,
144+
List<String> columns,
145+
List<ValueType> valueTypes,
146+
List<Function<Long, Object>> valueProducers
147+
) implements ResultStoreEntry {
148+
@Override
149+
public <T> T accept(Visitor<T> visitor) {
150+
return visitor.tableEntry(
151+
rows,
152+
columns,
153+
valueTypes,
154+
valueProducers
155+
);
156+
}
157+
}
138158
}

0 commit comments

Comments
 (0)