Package org.apache.drill.common.logical.data

Examples of org.apache.drill.common.logical.data.LogicalOperator


    return new DrillFilterRel(getCluster(), traitSet, sole(inputs), getCondition());
  }

  @Override
  public LogicalOperator implement(DrillImplementor implementor) {
    final LogicalOperator input = implementor.visitChild(this, 0, getChild());
    Filter f = new Filter(getFilterExpression(implementor.getContext()));
    f.setInput(input);
    return f;
  }
View Full Code Here


    return new DrillWriterRel(getCluster(), traitSet, sole(inputs), getCreateTableEntry());
  }

  @Override
  public LogicalOperator implement(DrillImplementor implementor) {
    LogicalOperator childOp = implementor.visitChild(this, 0, getChild());
    return Writer
        .builder()
        .setInput(childOp)
        .setCreateTableEntry(getCreateTableEntry())
        .build();
View Full Code Here

  }


  @Override
  public LogicalOperator implement(DrillImplementor implementor) {
    LogicalOperator inputOp = implementor.visitChild(this, 0, getChild());
    Project.Builder builder = Project.builder();
    builder.setInput(inputOp);
    for (NamedExpression e: this.getProjectExpressions(implementor.getContext())) {
      builder.addExpr(e);
    }
View Full Code Here

      planBuilder.addStorageEngine(table.getStorageEngineName(), table.getStorageEngineConfig());
    }
  }

  public void go(DrillRel root) {
    LogicalOperator rootLOP = root.implement(this);
    rootLOP.accept(new AddOpsVisitor(), null);
  }
View Full Code Here

    return new DrillLimitRel(getCluster(), traitSet, sole(inputs), offset, fetch);
  }

  @Override
  public LogicalOperator implement(DrillImplementor implementor) {
    LogicalOperator inputOp = implementor.visitChild(this, 0, getChild());
   
    // First offset to include into results (inclusive). Null implies it is starting from offset 0
    int first = offset != null ? Math.max(0, RexLiteral.intValue(offset)) : 0;

    // Last offset to stop including into results (exclusive), translating fetch row counts into an offset.
View Full Code Here

    return new DrillScreenRel(getCluster(), traitSet, sole(inputs));
  }
 
  @Override
  public LogicalOperator implement(DrillImplementor implementor) {
    LogicalOperator childOp = implementor.visitChild(this, 0, getChild());
    return Store.builder().setInput(childOp).storageEngine("--SCREEN--").build();
  }
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());

    final LogicalOperator leftOp = implementInput(implementor, 0, 0, left);
    final LogicalOperator rightOp = implementInput(implementor, 1, leftCount, right);

    Join.Builder builder = Join.builder();
    builder.type(joinType);
    builder.left(leftOp);
    builder.right(rightOp);
View Full Code Here

   * @param offset
   * @param input
   * @return
   */
  private LogicalOperator implementInput(DrillImplementor implementor, int i, int offset, RelNode input) {
    final LogicalOperator inputOp = implementor.visitChild(this, i, input);
    assert uniqueFieldNames(input.getRowType());
    final List<String> fields = getRowType().getFieldNames();
    final List<String> inputFields = input.getRowType().getFieldNames();
    final List<String> outputFields = fields.subList(offset, offset + inputFields.size());
    if (!outputFields.equals(inputFields)) {
View Full Code Here

    return new DrillFilterRel(getCluster(), traitSet, sole(inputs), getCondition());
  }

  @Override
  public LogicalOperator implement(DrillImplementor implementor) {
    final LogicalOperator input = implementor.visitChild(this, 0, getChild());
    Filter f = new Filter(getFilterExpression(implementor.getContext()));
    f.setInput(input);
    return f;
  }
View Full Code Here

  }


  @Override
  public LogicalOperator implement(DrillImplementor implementor) {
    LogicalOperator inputOp = implementor.visitChild(this, 0, getChild());
    Project.Builder builder = Project.builder();
    builder.setInput(inputOp);
    for (NamedExpression e: this.getProjectExpressions(implementor.getContext())) {
      builder.addExpr(e);
    }
View Full Code Here

TOP

Related Classes of org.apache.drill.common.logical.data.LogicalOperator

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.