andreachild commented on code in PR #3209:
URL: https://github.com/apache/tinkerpop/pull/3209#discussion_r2370965992
##########
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/sideEffect/AddPropertyStepPlaceholder.java:
##########
@@ -66,11 +69,19 @@ public AddPropertyStepPlaceholder(final Traversal.Admin
traversal, final VertexP
throw new IllegalArgumentException("GValue is not allowed for
property keys");
}
this.key = keyObject;
- this.value = GValue.of(valueObject);
- this.cardinality = cardinality;
+ if (this.key instanceof Traversal) {
+ this.integrateChild(((Traversal<?, ?>) this.key).asAdmin());
+ }
if (valueObject instanceof GValue) {
traversal.getGValueManager().register((GValue<?>) valueObject);
+ this.value = new GValueConstantTraversal<>((GValue<?>)
valueObject);
+ } else if (valueObject instanceof Traversal) {
+ this.value = ((Traversal<?, ?>) valueObject).asAdmin();
+ this.integrateChild(((Traversal<?, ?>) valueObject).asAdmin());
+ } else {
+ this.value = new ConstantTraversal<>(valueObject);
Review Comment:
Do `ConstantTraversal`s not need to be integrated as a child traversal?
--
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]