use of com.yahoo.search.yql.VespaGroupingStep in project vespa by vespa-engine.
the class GroupingParserTestCase method assertYqlParsable.
private static void assertYqlParsable(String request, String... expectedOperations) {
YqlParser parser = new YqlParser(new ParserEnvironment());
parser.parse(new Parsable().setQuery("select foo from bar where baz contains 'baz' | " + request + ";"));
List<VespaGroupingStep> steps = parser.getGroupingSteps();
List<String> actual = new ArrayList<>(steps.size());
for (VespaGroupingStep step : steps) {
actual.add(step.getOperation().toString());
}
if (expectedOperations.length > 0) {
assertEquals(Arrays.asList(expectedOperations), actual);
}
}
Aggregations