@Test public void testSearchCommandWithoutSourceShouldFail() { exceptionRule.expect(RuntimeException.class); exceptionRule.expectMessage("Failed to parse query due to offending symbol"); new PPLSyntaxParser().analyzeSyntax("search a=1"); }
public ParseTree analyzeSyntax(String query) { OpenDistroPPLParser parser = createParser(createLexer(query)); parser.addErrorListener(new SyntaxAnalysisErrorListener()); return parser.root(); }
PPLSyntaxParser { public ParseTree analyzeSyntax(String query) { OpenDistroPPLParser parser = createParser(createLexer(query)); parser.addErrorListener(new SyntaxAnalysisErrorListener()); return parser.root(); } }
PPLSyntaxParser { public ParseTree analyzeSyntax(String query) { OpenDistroPPLParser parser = createParser(createLexer(query)); parser.addErrorListener(new SyntaxAnalysisErrorListener()); return parser.root(); }  }
PPLSyntaxParser { public ParseTree analyzeSyntax(String query) { OpenDistroPPLParser parser = createParser(createLexer(query)); parser.addErrorListener(new SyntaxAnalysisErrorListener()); return parser.root(); }  ParseTree analyzeSyntax(String query); }
PPLSyntaxParser { public ParseTree analyzeSyntax(String query) { OpenDistroPPLParser parser = createParser(createLexer(query)); parser.addErrorListener(new SyntaxAnalysisErrorListener()); return parser.root(); }  ParseTree analyzeSyntax(String query);  }