You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by "spmallette (via GitHub)" <gi...@apache.org> on 2024/07/02 17:04:12 UTC

Re: [PR] Bytecode removal from server [tinkerpop]

spmallette commented on code in PR #2661:
URL: https://github.com/apache/tinkerpop/pull/2661#discussion_r1659380305


##########
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexTest.java:
##########
@@ -276,6 +277,7 @@ public void g_EXe7_e11X() {
     }
 
     @Test
+    @Ignore("g.E(Arrays.asList(e7, e11)) is not valid for gremlin-lang")

Review Comment:
   > in Grammar we allow g.V(vertex) and g.E(vertex), but not g.V(edge) and g.E(edge).
   
   what is `g.E(vertex)` and `g.V(edge)`? 
   
   > For gremlin-lang g.E(edge) translated as g.E(_1) because no Edge defined in Grammar.
   
   i think think that perhaps the problem here is that the grammar was adapted to allow the tests to work. from a grammar perspective, i'm not sure that anyone needs to do `g.V(Vertex(1,'person'))` (or the edge equivalent). You would simply do `g.V(1)`. i think `g.V(Vertex)` though is useful at the API level because you can do:
   
   ```groovy
   v = g.V(1).next()
   g.addE('self').from(v).to(v)
   ```
   
   but again, that's from a programming language perspective not the query perspective. might be smart to take something away here. 
   
   > But this approach not valid for g.E([edge1, edge2]), gremlin-lang can't handle Parameters inside array.
   
   i think i know why we allowed that `List` syntax:
   
   ```groovy
   l = g.V(1,2,3).toList()
   g.V(l)
   ```
   
   i wonder if that's a good idea though. maybe we're doing too much with this sort of overload.



-- 
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