Package org.eigenbase.relopt

Examples of org.eigenbase.relopt.RelTraitSet


  }

  @Override
  public void onMatch(RelOptRuleCall call) {
    final EnumerableTableAccessRel access = (EnumerableTableAccessRel) call.rel(0);
    final RelTraitSet traits = access.getTraitSet().plus(DrillRel.DRILL_LOGICAL);
    call.transformTo(new DrillScanRel(access.getCluster(), traits, access.getTable()));
  }
View Full Code Here


    super(RelNode.class, out, EnumerableConvention.INSTANCE,
        "JdbcToEnumerableConverterRule:" + out);
  }

  @Override public RelNode convert(RelNode rel) {
    RelTraitSet newTraitSet = rel.getTraitSet().replace(getOutTrait());
    return new JdbcToEnumerableConverter(rel.getCluster(), newTraitSet, rel);
  }
View Full Code Here

      // currently, don't use HashAggregate if any of the logical aggrs contains DISTINCT or
      // if there are no grouping keys
      return;
    }

    RelTraitSet traits = null;

    try {
      if (aggregate.getGroupSet().isEmpty()) {
        DrillDistributionTrait singleDist = DrillDistributionTrait.SINGLETON;
        traits = call.getPlanner().emptyTraitSet().plus(Prel.DRILL_PHYSICAL).plus(singleDist);
View Full Code Here

    }

    @Override
    public RelNode convertChild(DrillAggregateRel aggregate, RelNode input) throws InvalidRelException {

      RelTraitSet traits = newTraitSet(Prel.DRILL_PHYSICAL, input.getTraitSet().getTrait(DrillDistributionTraitDef.INSTANCE));
      RelNode newInput = convert(input, traits);

      HashAggPrel phase1Agg = new HashAggPrel(aggregate.getCluster(), traits, newInput,
          aggregate.getGroupSet(),
          aggregate.getAggCallList(),
View Full Code Here

    }
  }

  protected Prel convertToPrel(RelNode drel) throws RelConversionException {
    Preconditions.checkArgument(drel.getConvention() == DrillRel.DRILL_LOGICAL);
    RelTraitSet traits = drel.getTraitSet().plus(Prel.DRILL_PHYSICAL).plus(DrillDistributionTrait.SINGLETON);
    Prel phyRelNode = (Prel) planner.transform(DrillSqlWorker.PHYSICAL_MEM_RULES, traits, drel);
    OptionManager queryOptions = context.getOptions();

    if (context.getPlannerSettings().isMemoryEstimationEnabled()
      && !MemoryEstimationVisitor.enoughMemory(phyRelNode, queryOptions, context.getActiveEndpoints().size())) {
View Full Code Here

  @Override
  public void onMatch(RelOptRuleCall call) {
    final DrillWriterRelBase writer = call.rel(0);
    final RelNode input = call.rel(1);

    final RelTraitSet traits = input.getTraitSet().plus(Prel.DRILL_PHYSICAL);
    final RelNode convertedInput = convert(input, traits);

    if (!new WriteTraitPull(call).go(writer, convertedInput)) {
      DrillWriterRelBase newWriter = new WriterPrel(writer.getCluster(), convertedInput.getTraitSet(),
          convertedInput, writer.getCreateTableEntry());
View Full Code Here

                                                     RelNode input,
                                                     TableModificationRelBase.Operation operation,
                                                     List updateColumnList,
                                                     boolean flattened )
    {
    RelTraitSet traits = input.getTraitSet().replace( Cascading.CONVENTION );
    RelNode convertedInput = RelOptRule.convert( input, traits );

    return new CascadingTableModificationRel( cluster, traits, table, catalogReader,
      convertedInput, operation, updateColumnList, flattened );
    }
View Full Code Here

  @Override
  public void onMatch( RelOptRuleCall call )
    {
    ProjectRel rel = call.rel( 0 );

    RelTraitSet newTraits = rel.getTraitSet().plus( Cascading.CONVENTION );

    call.transformTo( new CascadingProjectRel(
      rel.getCluster(),
      newTraits,
      convert( rel.getChild(), newTraits ),
View Full Code Here

      rightKeys,
      outputProj );

    final RelNode newLeft = inputRels[ 0 ];
    final RelNode newRight = inputRels[ 1 ];
    final RelTraitSet traits = join.getCluster().traitSetOf( Cascading.CONVENTION );
    final RexNode newCondition = createCondition( join.getCluster().getRexBuilder(), newLeft, leftKeys, newRight, rightKeys );

    final CascadingJoinRel newJoin = new CascadingJoinRel( join.getCluster(), traits, convert( newLeft, traits ),
      convert( newRight, traits ), newCondition, join.getJoinType(), join.getVariablesStopped(), 0 );
View Full Code Here

  @Override
  public void onMatch( RelOptRuleCall call )
    {
    final ValuesRel values = call.rel( 1 );

    RelTraitSet newTraits = values.getTraitSet().plus( Cascading.CONVENTION );

    call.transformTo(
      new CascadingValuesRel( values.getCluster(), newTraits, values.getRowType(), values.getTuples() )
    );
    }
View Full Code Here

TOP

Related Classes of org.eigenbase.relopt.RelTraitSet

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.