MCPcopy Create free account
hub / github.com/apache/pig / parse

Method parse

test/org/apache/pig/parser/TestQueryParser.java:391–405  ·  view source on GitHub ↗
(String query)

Source from the content-addressed store, hash-verified

389 }
390
391 private int parse(String query) throws IOException, RecognitionException {
392 CharStream input = new QueryParserStringStream( query, null );
393 QueryLexer lexer = new QueryLexer(input);
394 CommonTokenStream tokens = new CommonTokenStream(lexer);
395
396 QueryParser parser = QueryParserUtils.createParser(tokens);
397 QueryParser.query_return result = parser.query();
398
399 Tree ast = (Tree)result.getTree();
400
401 System.out.println( ast.toStringTree() );
402 TreePrinter.printTree((CommonTree) ast, 0);
403 Assert.assertEquals(0, lexer.getNumberOfSyntaxErrors());
404 return parser.getNumberOfSyntaxErrors();
405 }
406
407 //PIG-2267
408 public void testThatColNameIsGeneratedProperly() throws IOException {

Callers 4

testBagTypeMethod · 0.95
testFlattenMethod · 0.95
shouldPassMethod · 0.95
shouldFailMethod · 0.95

Calls 3

createParserMethod · 0.95
printTreeMethod · 0.95
assertEqualsMethod · 0.45

Tested by

no test coverage detected