File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
core/src/main/java/org/neo4j/gds/core/loading Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -71,15 +71,23 @@ static Nodes of(
7171 } else {
7272 propertyMappings .mappings ().forEach (propertyMapping -> {
7373 var nodePropertyValues = properties .get (propertyMapping );
74+ // The default value is either overridden by the user
75+ // or inferred from the actual property value.
76+ var defaultValue = propertyMapping .defaultValue ().equals (DefaultValue .DEFAULT )
77+ ? DefaultValue .of (nodePropertyValues .valueType ())
78+ : propertyMapping .defaultValue ();
7479 var propertySchema = ImmutablePropertySchema .builder ()
7580 .key (propertyMapping .propertyKey ())
7681 .valueType (nodePropertyValues .valueType ())
77- .defaultValue (DefaultValue . of ( nodePropertyValues . valueType ()) )
82+ .defaultValue (defaultValue )
7883 .state (propertyState )
7984 .build ();
8085
8186 nodeSchema .addProperty (nodeLabel , propertySchema .key (), propertySchema );
82- nodePropertyStoreBuilder .putProperty (propertySchema .key (), ImmutableNodeProperty .of (nodePropertyValues , propertySchema ));
87+ nodePropertyStoreBuilder .putProperty (
88+ propertySchema .key (),
89+ ImmutableNodeProperty .of (nodePropertyValues , propertySchema )
90+ );
8391 });
8492 }
8593 }));
You can’t perform that action at this time.
0 commit comments