Kelvin Lawrence created TINKERPOP-3073: ------------------------------------------
Summary: Unexpected behavior from mergeV onCreate and a property step Key: TINKERPOP-3073 URL: https://issues.apache.org/jira/browse/TINKERPOP-3073 Project: TinkerPop Issue Type: Improvement Components: process Affects Versions: 3.7.2, 3.6.7, 3.7.1 Reporter: Kelvin Lawrence One could argue whether this is a bug or a feature request but the following behavior from the onCreate part of mergeV is confusing for an end user who expects it to work. You could further argue that specifying cardinality during onCreate is redundant, but the error message about the default Boolean on the stream will be very confusing for a user as unless they understand the implementation will have no idea where that Boolean even comes from. Setup to reproduce just an empty TinkerGraph and a fairly recent release {code:java} gremlin> Gremlin.version() ==>3.7.1 gremlin> g.mergeV([(T.id): 1, (T.label): 'airport']). ......1> option(onCreate, property(single,"prop", 1).constant([:])). ......2> option(onMatch, property(single,"prop", 2).constant([:])).valueMap() java.lang.Boolean cannot be cast to org.apache.tinkerpop.gremlin.structure.Element {code} If the query is rewritten as follows it works fine {code:java} gremlin> g.mergeV([(T.id): 1, (T.label): 'airport']). ......1> option(onCreate, [prop: 1]). ......2> option(onMatch, property(single,"prop", 2).constant([:])).valueMap() ==>[prop:[1]] gremlin> g.mergeV([(T.id): 1, (T.label): 'airport']). ......1> option(onCreate, [prop: 1]). ......2> option(onMatch, property(single,"prop", 2).constant([:])).valueMap() ==>[prop:[2]] {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)