Package org.apache.tajo.algebra

Examples of org.apache.tajo.algebra.Expr


    TaskAttemptContext ctx = new TaskAttemptContext(conf, LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
        new Fragment[] { frags[0] }, workDir);
    ctx.setEnforcer(new Enforcer());
    ctx.setOutputPath(new Path(workDir, "grouped2"));

    Expr context = analyzer.parse(CreateTableAsStmts[1]);
    LogicalPlan plan = planner.createPlan(context);
    LogicalNode rootNode = optimizer.optimize(plan);

    TableMeta outputMeta = CatalogUtil.newTableMeta(rootNode.getOutSchema(),
        StoreType.RCFILE);
View Full Code Here


        Integer.MAX_VALUE);
    QueryUnitAttemptId id = LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan);
    Path workDir = CommonTestingUtil.getTestDir("target/test-data/testPartitionedStorePlan");
    TaskAttemptContext ctx = new TaskAttemptContext(conf, id, new Fragment[] { frags[0] }, workDir);
    ctx.setEnforcer(new Enforcer());
    Expr context = analyzer.parse(QUERIES[7]);
    LogicalPlan plan = planner.createPlan(context);

    int numPartitions = 3;
    Column key1 = new Column("score.deptName", Type.TEXT);
    Column key2 = new Column("score.class", Type.TEXT);
View Full Code Here

    Path workDir = CommonTestingUtil.getTestDir(
        "target/test-data/testPartitionedStorePlanWithEmptyGroupingSet");
    TaskAttemptContext ctx = new TaskAttemptContext(conf, id, new Fragment[] { frags[0] }, workDir);
    ctx.setEnforcer(new Enforcer());
    Expr expr = analyzer.parse(QUERIES[14]);
    LogicalPlan plan = planner.createPlan(expr);
    LogicalNode rootNode = plan.getRootBlock().getRoot();
    int numPartitions = 1;
    DataChannel dataChannel = new DataChannel(masterPlan.newExecutionBlockId(), masterPlan.newExecutionBlockId(),
        PartitionType.HASH_PARTITION, numPartitions);
View Full Code Here

        Integer.MAX_VALUE);
    Path workDir = CommonTestingUtil.getTestDir("target/test-data/testAggregationFunction");
    TaskAttemptContext ctx = new TaskAttemptContext(conf, LocalTajoTestingUtility.newQueryUnitAttemptId(masterPlan),
        new Fragment[] { frags[0] }, workDir);
    ctx.setEnforcer(new Enforcer());
    Expr context = analyzer.parse(QUERIES[8]);
    LogicalPlan plan = planner.createPlan(context);
    LogicalNode rootNode = optimizer.optimize(plan);

    // Set all aggregation functions to the first phase mode
    GroupbyNode groupbyNode = PlannerUtil.findTopNode(rootNode, NodeType.GROUP_BY);
View Full Code Here

  };
 
  @Test
  public final void testProjectionPushWithNaturalJoin() throws PlanningException, CloneNotSupportedException {
    // two relations
    Expr expr = sqlAnalyzer.parse(QUERIES[4]);
    LogicalPlan newPlan = planner.createPlan(expr);
    LogicalNode plan = newPlan.getRootBlock().getRoot();
    assertEquals(NodeType.ROOT, plan.getType());
    LogicalRootNode root = (LogicalRootNode) plan;
    TestLogicalNode.testCloneLogicalNode(root);
View Full Code Here

  }
 
  @Test
  public final void testProjectionPushWithInnerJoin() throws PlanningException {
    // two relations
    Expr expr = sqlAnalyzer.parse(QUERIES[5]);
    LogicalPlan newPlan = planner.createPlan(expr);
    optimizer.optimize(newPlan);
  }
View Full Code Here

  }
 
  @Test
  public final void testProjectionPush() throws CloneNotSupportedException, PlanningException {
    // two relations
    Expr expr = sqlAnalyzer.parse(QUERIES[2]);
    LogicalPlan newPlan = planner.createPlan(expr);
    LogicalNode plan = newPlan.getRootBlock().getRoot();
   
    assertEquals(NodeType.ROOT, plan.getType());
    LogicalRootNode root = (LogicalRootNode) plan;
View Full Code Here

    assertEquals(NodeType.SCAN, root.getChild().getType());
  }
 
  @Test
  public final void testOptimizeWithGroupBy() throws CloneNotSupportedException, PlanningException {
    Expr expr = sqlAnalyzer.parse(QUERIES[3]);
    LogicalPlan newPlan = planner.createPlan(expr);
    LogicalNode plan = newPlan.getRootBlock().getRoot();
       
    assertEquals(NodeType.ROOT, plan.getType());
    LogicalRootNode root = (LogicalRootNode) plan;
View Full Code Here

  }

  @Test
  public final void testPushable() throws CloneNotSupportedException, PlanningException {
    // two relations
    Expr expr = sqlAnalyzer.parse(QUERIES[0]);
    LogicalPlan newPlan = planner.createPlan(expr);
    LogicalNode plan = newPlan.getRootBlock().getRoot();
   
    assertEquals(NodeType.ROOT, plan.getType());
    LogicalRootNode root = (LogicalRootNode) plan;
View Full Code Here

    assertTrue(PlannerUtil.canBeEvaluated(selNode.getQual(), scanNode));
  }

  @Test
  public final void testInsertInto() throws CloneNotSupportedException, PlanningException {
    Expr expr = sqlAnalyzer.parse(TestLogicalPlanner.insertStatements[0]);
    LogicalPlan newPlan = planner.createPlan(expr);
    optimizer.optimize(newPlan);
  }
View Full Code Here

TOP

Related Classes of org.apache.tajo.algebra.Expr

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.