You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2021/12/14 15:32:23 UTC

[GitHub] [tinkerpop] spmallette opened a new pull request #1516: TINKERPOP-2663 Allowed for Vertex/ReferenceVertex in grammar

spmallette opened a new pull request #1516:
URL: https://github.com/apache/tinkerpop/pull/1516


   https://issues.apache.org/jira/browse/TINKERPOP-2663
   
   This is helpful for `addE()` with `from()` and `to()` to be consistent with `Vertex` object signatures.
   
   VOTE +1


-- 
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: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tinkerpop] divijvaidya commented on a change in pull request #1516: TINKERPOP-2663 Allowed for Vertex/ReferenceVertex in grammar

Posted by GitBox <gi...@apache.org>.
divijvaidya commented on a change in pull request #1516:
URL: https://github.com/apache/tinkerpop/pull/1516#discussion_r772340594



##########
File path: CHANGELOG.asciidoc
##########
@@ -34,6 +34,7 @@ limitations under the License.
 * Improved behavior of `V()` and `E()` when `null` is an argument producing a filtering behavior rather than an exception.
 * Prevented metrics computation unless the traversal is in a locked state.
 * Added syntax to Gremlin grammar to explicitly define `byte`, `short` and `BigInteger`.
+* Added syntax to Gremlin grammar to allow construction of a reference `Vertex`.

Review comment:
       Shall we add an example in the changelog here to let the users know on what is possible in the syntax now?




-- 
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: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tinkerpop] divijvaidya commented on a change in pull request #1516: TINKERPOP-2663 Allowed for Vertex/ReferenceVertex in grammar

Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tinkerpop] spmallette merged pull request #1516: TINKERPOP-2663 Allowed for Vertex/ReferenceVertex in grammar

Posted by GitBox <gi...@apache.org>.
spmallette merged pull request #1516:
URL: https://github.com/apache/tinkerpop/pull/1516


   


-- 
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: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tinkerpop] divijvaidya commented on pull request #1516: TINKERPOP-2663 Allowed for Vertex/ReferenceVertex in grammar

Posted by GitBox <gi...@apache.org>.
divijvaidya commented on pull request #1516:
URL: https://github.com/apache/tinkerpop/pull/1516#issuecomment-997899015


   Vote +1
   
   Minor comment to add an example in the changelog so that users can see what new syntax is available. Other than that no concerns. 


-- 
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: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tinkerpop] spmallette commented on a change in pull request #1516: TINKERPOP-2663 Allowed for Vertex/ReferenceVertex in grammar

Posted by GitBox <gi...@apache.org>.
spmallette commented on a change in pull request #1516:
URL: https://github.com/apache/tinkerpop/pull/1516#discussion_r773056532



##########
File path: CHANGELOG.asciidoc
##########
@@ -34,6 +34,7 @@ limitations under the License.
 * Improved behavior of `V()` and `E()` when `null` is an argument producing a filtering behavior rather than an exception.
 * Prevented metrics computation unless the traversal is in a locked state.
 * Added syntax to Gremlin grammar to explicitly define `byte`, `short` and `BigInteger`.
+* Added syntax to Gremlin grammar to allow construction of a reference `Vertex`.

Review comment:
       I think we will handle all the docs around gremlin-language with this: https://issues.apache.org/jira/browse/TINKERPOP-2644 




-- 
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: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tinkerpop] spmallette commented on a change in pull request #1516: TINKERPOP-2663 Allowed for Vertex/ReferenceVertex in grammar

Posted by GitBox <gi...@apache.org>.
spmallette commented on a change in pull request #1516:
URL: https://github.com/apache/tinkerpop/pull/1516#discussion_r772313301



##########
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:
       added a comment to the grammar file.




-- 
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: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org