[
https://issues.apache.org/jira/browse/TINKERPOP-2663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17462561#comment-17462561
]
ASF GitHub Bot commented on TINKERPOP-2663:
-------------------------------------------
divijvaidya commented on a change in pull request #1516:
URL: https://github.com/apache/tinkerpop/pull/1516#discussion_r772301165
##########
File path: gremlin-language/src/main/antlr4/Gremlin.g4
##########
@@ -740,24 +742,28 @@ traversalMethod_write
ARGUMENT AND TERMINAL RULES
**********************************************/
+structureVertex
+ : NEW ('Vertex'|'ReferenceVertex') LPAREN genericLiteral COMMA
stringLiteral RPAREN
Review comment:
ReferenceVertex can be constructed without a label too in which case the
label is automatically assigned to "vertex". See
https://github.com/apache/tinkerpop/blob/7f7d3a485c7f100f98047b71672a0c2c9ab855b4/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceElement.java#L61
I think what you are doing is correct, i.e. to have users specify vertex
label explicitly but for completeness sake, please add a comment here on why we
don't allow a reference vertex with just an ID.
--
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]
> Support Vertex references in grammar
> ------------------------------------
>
> Key: TINKERPOP-2663
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2663
> Project: TinkerPop
> Issue Type: Improvement
> Components: language
> Affects Versions: 3.5.1
> Reporter: Stephen Mallette
> Assignee: Stephen Mallette
> Priority: Major
>
> With Java (and other variants) you can create an {{Element}} easy enough -
> {{ReferenceVertex}} and the like have easy to use constructors.
> {{gremlin-language}} could be made more consistent with such syntax:
> {code}
> g.addE('knows).from(Vertex(1)).to(Vertex(2))
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)