Package plan_runner.query_plans.debug

Source Code of plan_runner.query_plans.debug.HyracksL1Plan

package plan_runner.query_plans.debug;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;

import plan_runner.components.DataSourceComponent;
import plan_runner.conversion.IntegerConversion;
import plan_runner.operators.ProjectOperator;
import plan_runner.query_plans.QueryPlan;

public class HyracksL1Plan {
  private static Logger LOG = Logger.getLogger(HyracksL1Plan.class);

  private final QueryPlan _queryPlan = new QueryPlan();

  private static final IntegerConversion _ic = new IntegerConversion();

  public HyracksL1Plan(String dataPath, String extension, Map conf) {
    // -------------------------------------------------------------------------------------
    // start of query plan filling
    final ProjectOperator projectionCustomer = new ProjectOperator(new int[] { 0, 6 });
    final List<Integer> hashCustomer = Arrays.asList(0);
    new DataSourceComponent("CUSTOMER", dataPath + "customer" + extension, _queryPlan)
        .addOperator(projectionCustomer).setHashIndexes(hashCustomer).setPrintOut(false);

    // -------------------------------------------------------------------------------------
    final ProjectOperator projectionOrders = new ProjectOperator(new int[] { 1 });
    final List<Integer> hashOrders = Arrays.asList(0);
    new DataSourceComponent("ORDERS", dataPath + "orders" + extension, _queryPlan)
        .addOperator(projectionOrders).setHashIndexes(hashOrders).setPrintOut(false);

  }

  public QueryPlan getQueryPlan() {
    return _queryPlan;
  }

}
TOP

Related Classes of plan_runner.query_plans.debug.HyracksL1Plan

TOP
Copyright © 2018 www.massapi.com. 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.