imbajin commented on code in PR #654:
URL:
https://github.com/apache/incubator-hugegraph-toolchain/pull/654#discussion_r1962952044
##########
hugegraph-loader/src/main/java/org/apache/hugegraph/loader/builder/EdgeBuilder.java:
##########
@@ -55,10 +56,19 @@ public EdgeBuilder(LoadContext context, InputStruct struct,
super(context, struct);
this.mapping = mapping;
this.edgeLabel = this.getEdgeLabel(this.mapping.label());
- this.sourceLabel = this.getVertexLabel(this.edgeLabel.sourceLabel());
- this.targetLabel = this.getVertexLabel(this.edgeLabel.targetLabel());
this.nonNullKeys = this.nonNullableKeys(this.edgeLabel);
- // Ensure that the source/target id fields are matched with id strategy
+ if (this.edgeLabel.edgeLabelType().general()) {
+ // If creating a general type edge, the loader cannot obtain the
vertexLabel information of both ends
Review Comment:
```suggestion
// If create a general type edge, the loader can't obtain the
vertexlabel info of both ends
```
##########
hugegraph-loader/src/main/java/org/apache/hugegraph/loader/builder/EdgeBuilder.java:
##########
@@ -189,7 +199,7 @@ private void checkIdFields(VertexLabel vertexLabel,
List<String> fields) {
} else if (vertexLabel.idStrategy().isPrimaryKey()) {
E.checkArgument(fields.size() >= 1,
"The source/target field must contains some " +
- "columns when id strategy is PrimaryKey");
+ "columns when id strategy is CUSTOMIZE");
Review Comment:
logic confused?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]