summaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/search/grouping/request/parser/GroupingParserTestCase.java
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-03-23 20:30:23 +0100
committerGitHub <noreply@github.com>2022-03-23 20:30:23 +0100
commit73b080b527e303a60a365b2bb95b72dcc2f81f4c (patch)
treee24f76238e11794e82a6fa5dcb29e3aca2a45af1 /container-search/src/test/java/com/yahoo/search/grouping/request/parser/GroupingParserTestCase.java
parentb07fc575ba690710f6524004848e5fc01b3a3152 (diff)
parent9b505f09092c7df8900da85b9f1d08149466c96d (diff)
Merge pull request #21787 from vespa-engine/bjorncs/grouping-max-infv7.564.19
Bjorncs/grouping max inf
Diffstat (limited to 'container-search/src/test/java/com/yahoo/search/grouping/request/parser/GroupingParserTestCase.java')
-rw-r--r--container-search/src/test/java/com/yahoo/search/grouping/request/parser/GroupingParserTestCase.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/container-search/src/test/java/com/yahoo/search/grouping/request/parser/GroupingParserTestCase.java b/container-search/src/test/java/com/yahoo/search/grouping/request/parser/GroupingParserTestCase.java
index c42aa905dd4..0dfd4685c0f 100644
--- a/container-search/src/test/java/com/yahoo/search/grouping/request/parser/GroupingParserTestCase.java
+++ b/container-search/src/test/java/com/yahoo/search/grouping/request/parser/GroupingParserTestCase.java
@@ -16,6 +16,7 @@ import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -579,6 +580,11 @@ public class GroupingParserTestCase {
assertIllegalArgument("all(group(debugwait(artist, 3.3, lol)))",
"Encountered \" <IDENTIFIER> \"lol\"\" at line 1, column 34");
assertParse("all(group(artist) each(output(stddev(simple))))");
+
+ // Test max()
+ assertTrue(assertParse("all(group(artist) max(inf))").get(0).hasUnlimitedMax());
+ assertEquals(1, assertParse("all(group(artist) max(1))").get(0).getMax());
+ assertFalse(assertParse("all(group(artist))").get(0).hasMax());
}
@Test