Package org.apache.drill.exec.physical.base

Examples of org.apache.drill.exec.physical.base.PhysicalOperator


    RootExec root = null;
    private ScreenCreator sc = new ScreenCreator();

    public static PhysicalOperator getExec(FragmentContext context, FragmentRoot root) throws ExecutionSetupException {
        TraceInjector tI = new TraceInjector();
        PhysicalOperator newOp = root.accept(tI, context);

        return newOp;
    }
View Full Code Here


    @Override
    public PhysicalOperator visitOp(PhysicalOperator op, FragmentContext context) throws ExecutionSetupException{

        List<PhysicalOperator> newChildren = Lists.newArrayList();
        List<PhysicalOperator> list = null;
        PhysicalOperator newOp = op;

        /* Get the list of child operators */
        for (PhysicalOperator child : op)
        {
            newChildren.add(child.accept(this, context));
        }

        list = Lists.newArrayList();

        /* For every child operator create a trace operator as its parent */
        for (int i = 0; i < newChildren.size(); i++)
        {
            String traceTag = newChildren.get(i).toString() + Integer.toString(traceTagCount++);

            /* Trace operator */
            Trace traceOp = new Trace(newChildren.get(i), traceTag);
            list.add(traceOp);
        }

        /* Inject trace operator */
        if (list.size() > 0)
            newOp = op.getNewWithChildren(list);
            newOp.setOperatorId(op.getOperatorId());

        return newOp;
    }
View Full Code Here

  @Override
  public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException {
    Prel child = (Prel) this.getChild();

    PhysicalOperator childPOP = child.getPhysicalOperator(creator);

    Project p = new Project(this.getProjectExpressions(new DrillParseContext()),  childPOP);
    return creator.addMetadata(this, p);
  }
View Full Code Here

  @Override
  public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException {

    Prel child = (Prel) this.getChild();

    PhysicalOperator childPOP = child.getPhysicalOperator(creator);

    Filter p = new Filter(childPOP, getFilterExpression(new DrillParseContext()), 1.0f);
    return creator.addMetadata(this, p);
  }
View Full Code Here

  @Override
  public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException {
    Prel child = (Prel) this.getChild();

    PhysicalOperator childPOP = child.getPhysicalOperator(creator);

    Screen s = new Screen(childPOP, creator.getContext().getCurrentEndpoint());
    return creator.addMetadata(this, s);
  }
View Full Code Here

  }

  public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException {
    Prel child = (Prel) this.getChild();

    PhysicalOperator childPOP = child.getPhysicalOperator(creator);

    if(PrelUtil.getSettings(getCluster()).isSingleMode()) return childPOP;

    HashToRandomExchange g = new HashToRandomExchange(childPOP, PrelUtil.getHashExpression(this.fields, getChild().getRowType()));
    return creator.addMetadata(this, g);
View Full Code Here

      // Convert the query to Drill Logical plan and insert a writer operator on top.
      DrillRel drel = convertToDrel(relQuery, drillSchema, newTblName);
      log("Drill Logical", drel);
      Prel prel = convertToPrel(drel);
      log("Drill Physical", prel);
      PhysicalOperator pop = convertToPop(prel);
      PhysicalPlan plan = convertToPlan(pop);
      log("Drill Plan", plan);

      return plan;
    } catch(Exception e) {
View Full Code Here

    final int leftCount = left.getRowType().getFieldCount();
    final List<String> leftFields = fields.subList(0, leftCount);
    final List<String> rightFields = fields.subList(leftCount, fields.size());

    PhysicalOperator leftPop = ((Prel)left).getPhysicalOperator(creator);
    PhysicalOperator rightPop = ((Prel)right).getPhysicalOperator(creator);

    JoinRelType jtype = this.getJoinType();

    List<JoinCondition> conditions = Lists.newArrayList();
View Full Code Here

  }

  public PhysicalOperator getPhysicalOperator(PhysicalPlanCreator creator) throws IOException {
    Prel child = (Prel) this.getChild();

    PhysicalOperator childPOP = child.getPhysicalOperator(creator);

    if(PrelUtil.getSettings(getCluster()).isSingleMode()) return childPOP;

    HashToMergeExchange g = new HashToMergeExchange(childPOP,
        PrelUtil.getHashExpression(this.distFields, getChild().getRowType()),
View Full Code Here

    assert isUnique(fields);
    final int leftCount = left.getRowType().getFieldCount();
    final List<String> leftFields = fields.subList(0, leftCount);
    final List<String> rightFields = fields.subList(leftCount, fields.size());

    PhysicalOperator leftPop = ((Prel)left).getPhysicalOperator(creator);
    PhysicalOperator rightPop = ((Prel)right).getPhysicalOperator(creator);

    JoinRelType jtype = this.getJoinType();

    List<JoinCondition> conditions = Lists.newArrayList();
View Full Code Here

TOP

Related Classes of org.apache.drill.exec.physical.base.PhysicalOperator

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.