コード例 #1
0
ファイル: QueryExplainer.java プロジェクト: Ravion/Presto-1
  private Plan getLogicalPlan(Statement statement) {
    // analyze statement
    Analyzer analyzer =
        new Analyzer(session, metadata, Optional.of(this), experimentalSyntaxEnabled);

    Analysis analysis = analyzer.analyze(statement);
    PlanNodeIdAllocator idAllocator = new PlanNodeIdAllocator();

    // plan statement
    LogicalPlanner logicalPlanner =
        new LogicalPlanner(session, planOptimizers, idAllocator, metadata);
    return logicalPlanner.plan(analysis);
  }
コード例 #2
0
ファイル: QueryExplainer.java プロジェクト: Ravion/Presto-1
  private SubPlan getDistributedPlan(Statement statement) {
    // analyze statement
    Analyzer analyzer =
        new Analyzer(session, metadata, Optional.of(this), experimentalSyntaxEnabled);

    Analysis analysis = analyzer.analyze(statement);
    PlanNodeIdAllocator idAllocator = new PlanNodeIdAllocator();

    // plan statement
    LogicalPlanner logicalPlanner =
        new LogicalPlanner(session, planOptimizers, idAllocator, metadata);
    Plan plan = logicalPlanner.plan(analysis);

    return new DistributedLogicalPlanner(metadata, idAllocator).createSubPlans(plan, false);
  }