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

Method parse

src/org/apache/pig/parser/QueryParserDriver.java:176–205  ·  view source on GitHub ↗
(String query)

Source from the content-addressed store, hash-verified

174 }
175
176 public LogicalPlan parse(String query) throws ParserException {
177 LogicalPlan plan = null;
178
179 ScriptState ss = ScriptState.get();
180 CommonTokenStream tokenStream = tokenize(query, ss.getFileName());
181
182 Tree ast = parse( tokenStream );
183 ast = expandMacro( ast );
184
185 try{
186 ast = validateAst( ast );
187 applyRegisters(ast);
188
189 LogicalPlanGenerator planGenerator =
190 new LogicalPlanGenerator( new CommonTreeNodeStream( ast ), pigContext, scope, fileNameMap );
191 planGenerator.query();
192
193 checkError( planGenerator );
194
195 plan = planGenerator.getLogicalPlan();
196 operators = planGenerator.getOperators();
197 lastRel = planGenerator.getLastRel();
198 } catch(RecognitionException ex) {
199 throw new ParserException( ex );
200 } catch(Exception ex) {
201 throw new ParserException( ex.getMessage(), ex );
202 }
203
204 return plan;
205 }
206
207 public Map<String, Operator> getOperators() {
208 return operators;

Callers 15

checkStorePathMethod · 0.95
parseMethod · 0.95
parseAndPreprocessMethod · 0.95
checkLoadPathMethod · 0.95
validateQueryMethod · 0.95
parseQueryMethod · 0.95
macroImportMethod · 0.95
processPigMethod · 0.95
_deserialize_inputFunction · 0.45
parseStopOnErrorMethod · 0.45
parseOnlyMethod · 0.45
loadScriptMethod · 0.45

Calls 13

getMethod · 0.95
tokenizeMethod · 0.95
getFileNameMethod · 0.95
expandMacroMethod · 0.95
validateAstMethod · 0.95
applyRegistersMethod · 0.95
checkErrorMethod · 0.95
createParserMethod · 0.95
getOperatorsMethod · 0.65
getLogicalPlanMethod · 0.45
getLastRelMethod · 0.45
getMessageMethod · 0.45

Tested by 4

checkStorePathMethod · 0.76
parseMethod · 0.76
parseAndPreprocessMethod · 0.76
checkLoadPathMethod · 0.76