MCPcopy Create free account
hub / github.com/1345414527/MIT6.830 / generateLogicalPlan

Method generateLogicalPlan

src/java/simpledb/Parser.java:466–482  ·  view source on GitHub ↗
(TransactionId tid, String s)

Source from the content-addressed store, hash-verified

464 }
465
466 public LogicalPlan generateLogicalPlan(TransactionId tid, String s)
467 throws simpledb.ParsingException, IOException {
468 ByteArrayInputStream bis = new ByteArrayInputStream(s.getBytes());
469 ZqlParser p = new ZqlParser(bis);
470 try {
471 ZStatement stmt = p.readStatement();
472 if (stmt instanceof ZQuery) {
473 return parseQueryLogicalPlan(tid, (ZQuery) stmt);
474 }
475 } catch (Zql.ParseException e) {
476 throw new simpledb.ParsingException(
477 "Invalid SQL expression: \n \t " + e);
478 }
479
480 throw new simpledb.ParsingException(
481 "Cannot generate logical plan for expression : " + s);
482 }
483
484 public void setTransaction(Transaction t) {
485 curtrans = t;

Callers 5

estimateJoinCostTestMethod · 0.95
orderJoinsTestMethod · 0.95
bigOrderJoinsTestMethod · 0.95

Calls 1

parseQueryLogicalPlanMethod · 0.95

Tested by 5

estimateJoinCostTestMethod · 0.76
orderJoinsTestMethod · 0.76
bigOrderJoinsTestMethod · 0.76