spmallette commented on code in PR #3212:
URL: https://github.com/apache/tinkerpop/pull/3212#discussion_r2362558801
##########
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/RepeatUnrollStrategyTest.java:
##########
@@ -120,24 +122,35 @@ public static Iterable<Object[]> generateTestParameters()
{
{__.repeat(out()).times(2).as("x").repeat(in().as("b")).times(3),
out().barrier(repeatBarrierSize).out().barrier(repeatBarrierSize).as("x").in().as("b").barrier(repeatBarrierSize).in().as("b").barrier(repeatBarrierSize).in().as("b").barrier(repeatBarrierSize),
Collections.emptyList()},
{__.repeat(__.outE("created").inV()).times(2),
__.outE("created").inV().barrier(repeatBarrierSize).outE("created").inV().barrier(repeatBarrierSize),
Collections.emptyList()},
{__.repeat(out()).times(3),
out().barrier(repeatBarrierSize).out().barrier(repeatBarrierSize).out().barrier(repeatBarrierSize),
Collections.emptyList()},
-
{__.repeat(__.local(__.select("a").out("knows"))).times(2),
__.local(__.select("a").out("knows")).barrier(repeatBarrierSize).local(__.select("a").out("knows")).barrier(repeatBarrierSize),
Collections.emptyList()},
+
{__.repeat(__.local(__.select("a").out("knows"))).times(2),
__.repeat(__.local(__.select("a").out("knows"))).times(2),
Collections.emptyList()},
{__.<Vertex>times(2).repeat(out()),
out().barrier(repeatBarrierSize).out().barrier(repeatBarrierSize),
Collections.emptyList()},
{__.<Vertex>out().times(2).repeat(out().as("a")).as("x"),
out().out().as("a").barrier(repeatBarrierSize).out().as("a").barrier(repeatBarrierSize).as("x"),
Collections.emptyList()},
{__.repeat(out()).emit().times(2),
__.repeat(out()).emit().times(2), Collections.emptyList()},
{__.repeat(out()).until(predicate),
__.repeat(out()).until(predicate), Collections.emptyList()},
{__.repeat(out()).until(predicate).repeat(out()).times(2),
__.repeat(out()).until(predicate).out().barrier(repeatBarrierSize).out().barrier(repeatBarrierSize),
Collections.emptyList()},
- {__.repeat(__.union(__.both(),
__.identity())).times(2).out(), __.union(__.both(),
__.identity()).barrier(repeatBarrierSize).union(__.both(),
__.identity()).barrier(repeatBarrierSize).out(), Collections.emptyList()},
+ {__.repeat(__.union(__.both(),
__.identity())).times(2).out(), __.repeat(__.union(__.both(),
__.identity())).times(2).out(), Collections.emptyList()},
Review Comment:
these are now rejection cases...i feel like we should have more of those
negative case. maybe group all those together, so they are easy to spot/extend.
--
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]