File tree Expand file tree Collapse file tree 4 files changed +7
-9
lines changed
core/src/main/java/org/neo4j/gds/core/loading
graph-sampling/src/main/java/org/neo4j/gds/graphsampling
subgraph-filtering/src/main/java/org/neo4j/gds/beta/filter Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ public static CSRGraphStore createFromGraph(
104104 // TODO: is it correct that we only use this for generated graphs?
105105 .capabilities (ImmutableStaticCapabilities .of (false ))
106106 .schema (schema )
107- .nodes (Nodes .of (graph .idMap (), nodeProperties ))
107+ .nodes (ImmutableNodes .of (schema . nodeSchema (), graph .idMap (), nodeProperties ))
108108 .relationshipImportResult (relationshipImportResult )
109109 .graphProperties (GraphPropertyStore .empty ())
110110 .concurrency (concurrency )
Original file line number Diff line number Diff line change 2020package org .neo4j .gds .core .loading ;
2121
2222import org .immutables .value .Value ;
23+ import org .jetbrains .annotations .TestOnly ;
2324import org .neo4j .gds .NodeLabel ;
2425import org .neo4j .gds .PropertyMapping ;
2526import org .neo4j .gds .PropertyMappings ;
@@ -50,14 +51,11 @@ default NodePropertyStore properties() {
5051 return NodePropertyStore .empty ();
5152 }
5253
54+ @ TestOnly
5355 static Nodes of (IdMap idmap ) {
5456 return ImmutableNodes .of (NodeSchema .empty (), idmap , NodePropertyStore .empty ());
5557 }
5658
57- static Nodes of (IdMap idmap , NodePropertyStore nodePropertyStore ) {
58- return ImmutableNodes .of (NodeSchema .empty (), idmap , nodePropertyStore );
59- }
60-
6159 static Nodes of (
6260 IdMap idMap ,
6361 Map <NodeLabel , PropertyMappings > propertyMappingsByLabel ,
Original file line number Diff line number Diff line change 3333import org .neo4j .gds .core .concurrency .Pools ;
3434import org .neo4j .gds .core .concurrency .RunWithConcurrency ;
3535import org .neo4j .gds .core .loading .GraphStoreBuilder ;
36- import org .neo4j .gds .core .loading .Nodes ;
36+ import org .neo4j .gds .core .loading .ImmutableNodes ;
3737import org .neo4j .gds .core .loading .RelationshipImportResult ;
3838import org .neo4j .gds .core .loading .construction .GraphFactory ;
3939import org .neo4j .gds .core .loading .construction .NodeLabelTokens ;
@@ -124,7 +124,7 @@ public double evaluate(EvaluationContext context) {
124124 .databaseId (inputGraphStore .databaseId ())
125125 .capabilities (inputGraphStore .capabilities ())
126126 .schema (filteredSchema )
127- .nodes (Nodes .of (idMap , nodePropertyStore ))
127+ .nodes (ImmutableNodes .of (filteredSchema . nodeSchema (), idMap , nodePropertyStore ))
128128 .relationshipImportResult (relationshipImportResult )
129129 .concurrency (config .concurrency ())
130130 .build ();
Original file line number Diff line number Diff line change 3434import org .neo4j .gds .beta .filter .expression .ValidationContext ;
3535import org .neo4j .gds .config .GraphProjectFromGraphConfig ;
3636import org .neo4j .gds .core .loading .GraphStoreBuilder ;
37- import org .neo4j .gds .core .loading .Nodes ;
37+ import org .neo4j .gds .core .loading .ImmutableNodes ;
3838import org .neo4j .gds .core .loading .RelationshipImportResult ;
3939import org .neo4j .gds .core .utils .progress .tasks .ProgressTracker ;
4040import org .neo4j .gds .core .utils .progress .tasks .Task ;
@@ -121,7 +121,7 @@ public static GraphStore filter(
121121 .databaseId (graphStore .databaseId ())
122122 .capabilities (graphStore .capabilities ())
123123 .schema (filteredSchema )
124- .nodes (Nodes .of (filteredNodes .idMap (), filteredNodes .propertyStores ()))
124+ .nodes (ImmutableNodes .of (filteredSchema . nodeSchema (), filteredNodes .idMap (), filteredNodes .propertyStores ()))
125125 .relationshipImportResult (RelationshipImportResult .of (filteredRelationships ))
126126 .concurrency (config .concurrency ())
127127 .build ();
You can’t perform that action at this time.
0 commit comments