Package org.apache.flink.test.recordJobs.relational

Examples of org.apache.flink.test.recordJobs.relational.TPCHQuery3


    dump(new WordCount().getPlan(DEFAULT_PARALLELISM_STRING, IN_FILE, OUT_FILE));
  }
 
  @Test
  public void dumpTPCH3() {
    dump(new TPCHQuery3().getPlan(DEFAULT_PARALLELISM_STRING, IN_FILE, IN_FILE, OUT_FILE));
  }
View Full Code Here


    dump(new WordCount().getPlan(NO_ARGS));
  }
 
  @Test
  public void dumpTPCH3() {
    dump(new TPCHQuery3().getPlan("4", IN_FILE, IN_FILE, OUT_FILE));
    dump(new TPCHQuery3().getPlan(NO_ARGS));
  }
View Full Code Here

   * Verifies that a robust repartitioning plan with a hash join is created in the absence of statistics.
   */
  @Test
  public void testQueryNoStatistics() {
    try {
      TPCHQuery3 query = new TPCHQuery3();
      Plan p = query.getPlan(DEFAULT_PARALLELISM_STRING, IN_FILE, IN_FILE, OUT_FILE);
     
      // compile
      final OptimizedPlan plan = compileNoStats(p);
     
      final OptimizerPlanNodeResolver or = getOptimizerPlanNodeResolver(plan);
View Full Code Here

   * Statistics that push towards a repartition merge join. If the join blows the data volume up significantly,
   * re-exploiting the sorted order is cheaper.
   */
  @Test
  public void testQueryWithStatsForRepartitionMerge() {
    TPCHQuery3 query = new TPCHQuery3();
    Plan p = query.getPlan(DEFAULT_PARALLELISM_STRING, IN_FILE, IN_FILE, OUT_FILE);
   
    // set compiler hints
    OperatorResolver cr = getContractResolver(p);
    JoinOperator match = cr.getNode("JoinLiO");
    match.getCompilerHints().setFilterFactor(100f);
View Full Code Here

  private void testQueryGeneric(long orderSize, long lineItemSize,
      float ordersFilterFactor, float joinFilterFactor,
      boolean broadcastOkay, boolean partitionedOkay,
      boolean hashJoinFirstOkay, boolean hashJoinSecondOkay, boolean mergeJoinOkay)
  {
    TPCHQuery3 query = new TPCHQuery3();
    Plan p = query.getPlan(DEFAULT_PARALLELISM_STRING, IN_FILE, IN_FILE, OUT_FILE);
    testQueryGeneric(p, orderSize, lineItemSize, ordersFilterFactor, joinFilterFactor, broadcastOkay, partitionedOkay, hashJoinFirstOkay, hashJoinSecondOkay, mergeJoinOkay);
  }
View Full Code Here

  }

  @Override
  protected Plan getTestJob() {

    TPCHQuery3 tpch3 = new TPCHQuery3();
    return tpch3.getPlan(
        String.valueOf(config.getInteger("dop", 1)),
        ordersPath,
        lineitemsPath,
        resultPath);
  }
View Full Code Here

      .field(DoubleValue.class, 2);
   
    // create ReduceOperator for aggregating the result
    // the reducer has a composite key, consisting of the fields 0 and 1
    @SuppressWarnings("unchecked")
    ReduceOperator aggLiO = ReduceOperator.builder(new AggLiO())
      .keyField(LongValue.class, 0)
      .keyField(StringValue.class, 1)
      .input(joinLiO, partJoin2, partJoin1)
      .name("AggLio")
      .build();
View Full Code Here

      .fieldDelimiter('|')
      .field(LongValue.class, 0)
      .field(DoubleValue.class, 5);

    // create MapOperator for filtering Orders tuples
    MapOperator filterO1 = MapOperator.builder(new FilterO())
      .name("FilterO")
      .input(orders1)
      .build();
    // filter configuration
    filterO1.setParameter(TPCHQuery3.YEAR_FILTER, 1993);
    filterO1.setParameter(TPCHQuery3.PRIO_FILTER, "5");
    filterO1.getCompilerHints().setFilterFactor(0.05f);
   
    // create MapOperator for filtering Orders tuples
    MapOperator filterO2 = MapOperator.builder(new FilterO())
      .name("FilterO")
      .input(orders2)
      .build();
    // filter configuration
    filterO2.setParameter(TPCHQuery3.YEAR_FILTER, 1993);
View Full Code Here

    filterO2.setParameter(TPCHQuery3.YEAR_FILTER, 1993);
    filterO2.setParameter(TPCHQuery3.PRIO_FILTER, "5");

    // create JoinOperator for joining Orders and LineItems
    @SuppressWarnings("unchecked")
    JoinOperator joinLiO = JoinOperator.builder(new JoinLiO(), LongValue.class, 0, 0)
      .input1(filterO2, filterO1)
      .input2(lineitems)
      .name("JoinLiO")
      .build();
   
View Full Code Here

TOP

Related Classes of org.apache.flink.test.recordJobs.relational.TPCHQuery3

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.