From 3e53c18b9b0de7674e1533fc2b49b55088653099 Mon Sep 17 00:00:00 2001 From: shirly121 Date: Sun, 4 Feb 2024 19:20:13 +0800 Subject: [PATCH] [GIE Compiler] add e2e test --- .../suite/pattern/PatternQueryTest.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/interactive_engine/compiler/src/main/java/com/alibaba/graphscope/gremlin/integration/suite/pattern/PatternQueryTest.java b/interactive_engine/compiler/src/main/java/com/alibaba/graphscope/gremlin/integration/suite/pattern/PatternQueryTest.java index 6f24cc46a240..f565eec26a80 100644 --- a/interactive_engine/compiler/src/main/java/com/alibaba/graphscope/gremlin/integration/suite/pattern/PatternQueryTest.java +++ b/interactive_engine/compiler/src/main/java/com/alibaba/graphscope/gremlin/integration/suite/pattern/PatternQueryTest.java @@ -25,6 +25,8 @@ import org.junit.Assert; import org.junit.Test; +import java.util.Map; + public abstract class PatternQueryTest extends AbstractGremlinProcessTest { public abstract Traversal get_pattern_1_test(); @@ -60,6 +62,8 @@ public abstract class PatternQueryTest extends AbstractGremlinProcessTest { public abstract Traversal get_pattern_17_test(); + public abstract Traversal> get_g_V_limit_100_group_test(); + @Test public void run_pattern_1_test() { Traversal traversal = this.get_pattern_1_test(); @@ -179,6 +183,15 @@ public void run_pattern_17_test() { Assert.assertEquals(17367L, traversal.next().longValue()); } + @Test + public void run_g_V_limit_100_group_test() { + Traversal> traversal = this.get_g_V_limit_100_group_test(); + this.printTraversalForm(traversal); + Map map = traversal.next(); + Assert.assertEquals(100, map.size()); + Assert.assertFalse(traversal.hasNext()); + } + public static class Traversals extends PatternQueryTest { // PM1 @@ -386,5 +399,10 @@ public Traversal get_pattern_17_test() { .as("b")) .count(); } + + @Override + public Traversal> get_g_V_limit_100_group_test() { + return g.V().hasLabel("PERSON").limit(100).group().by("firstName").by(__.count()); + } } }