diff options
author | Tor Egge <Tor.Egge@online.no> | 2023-12-07 16:08:56 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2023-12-07 16:08:56 +0100 |
commit | a32bb8795a32367a95e7883fe61c8c9ccd085892 (patch) | |
tree | 135170cf3e7e39d9229c62e061f48c68e0bce236 /container-search/src/test/java/com/yahoo/search | |
parent | 10a580357998b4c750729f27d3ef2e224dd69af7 (diff) |
Detect integer fields in fieldsets.
Diffstat (limited to 'container-search/src/test/java/com/yahoo/search')
-rw-r--r-- | container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java b/container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java index 178163cf961..783a0ec61de 100644 --- a/container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java +++ b/container-search/src/test/java/com/yahoo/search/yql/YqlParserTestCase.java @@ -90,6 +90,10 @@ public class YqlParserTestCase { sd.addIndex(stringIndex); Index floatIndex = new Index("float"); sd.addIndex(floatIndex); + Index mixedIndex = new Index("mixed"); + mixedIndex.setInteger(true); + mixedIndex.setString(true); + sd.addIndex(mixedIndex); return new IndexFacts(new IndexModel(sd)); } @@ -1201,6 +1205,9 @@ public class YqlParserTestCase { assertParseFail("select * from sources * where float in (25)", new IllegalArgumentException("The in operator is only supported for integer and string fields. " + "The field float is not of these types")); + assertParseFail("select * from sources * where mixed in (25)", + new IllegalArgumentException("The in operator is not supported for fieldsets with a mix of integer " + + "and string fields. The fieldset mixed has both")); } private static void assertNumericInItem(String field, long[] values, QueryTree query) { |