Package org.eigenbase.relopt.volcano

Examples of org.eigenbase.relopt.volcano.VolcanoPlanner$Provenance


  }

  /** Creates a query planner and initializes it with a default set of
   * rules. */
  protected RelOptPlanner createPlanner(Context context) {
    final VolcanoPlanner planner = new VolcanoPlanner();
    planner.addRelTraitDef(ConventionTraitDef.INSTANCE);
    if (ENABLE_COLLATION_TRAIT) {
      planner.addRelTraitDef(RelCollationTraitDef.INSTANCE);
      planner.registerAbstractRelationalRules();
    }
    RelOptUtil.registerAbstractRels(planner);
    for (RelOptRule rule : DEFAULT_RULES) {
      planner.addRule(rule);
    }

    // Change the below to enable constant-reduction.
    if (false) {
      for (RelOptRule rule : CONSTANT_REDUCTION_RULES) {
        planner.addRule(rule);
      }
    }

    final SparkHandler spark = context.spark();
    if (spark.enabled()) {
View Full Code Here


  /** Creates a query planner and initializes it with a default set of
   * rules. */
  protected RelOptPlanner createPlanner(OptiqPrepare.Context prepareContext,
      org.eigenbase.relopt.Context externalContext,
      RelOptCostFactory costFactory) {
    final VolcanoPlanner planner =
        new VolcanoPlanner(costFactory, externalContext);
    planner.addRelTraitDef(ConventionTraitDef.INSTANCE);
    if (ENABLE_COLLATION_TRAIT) {
      planner.addRelTraitDef(RelCollationTraitDef.INSTANCE);
      planner.registerAbstractRelationalRules();
    }
    RelOptUtil.registerAbstractRels(planner);
    for (RelOptRule rule : DEFAULT_RULES) {
      planner.addRule(rule);
    }

    // Change the below to enable constant-reduction.
    if (false) {
      for (RelOptRule rule : CONSTANT_REDUCTION_RULES) {
        planner.addRule(rule);
      }
    }

    final SparkHandler spark = prepareContext.spark();
    if (spark.enabled()) {
View Full Code Here

      org.eigenbase.relopt.Context externalContext,
      RelOptCostFactory costFactory) {
    if (externalContext == null) {
      externalContext = Contexts.withConfig(prepareContext.config());
    }
    final VolcanoPlanner planner =
        new VolcanoPlanner(costFactory, externalContext);
    planner.addRelTraitDef(ConventionTraitDef.INSTANCE);
    if (ENABLE_COLLATION_TRAIT) {
      planner.addRelTraitDef(RelCollationTraitDef.INSTANCE);
      planner.registerAbstractRelationalRules();
    }
    RelOptUtil.registerAbstractRels(planner);
    for (RelOptRule rule : DEFAULT_RULES) {
      planner.addRule(rule);
    }

    // Change the below to enable constant-reduction.
    if (false) {
      for (RelOptRule rule : CONSTANT_REDUCTION_RULES) {
        planner.addRule(rule);
      }
    }

    final SparkHandler spark = prepareContext.spark();
    if (spark.enabled()) {
View Full Code Here

  public HiveVolcanoPlanner() {
    super(HiveCost.FACTORY, null);
  }

  public static RelOptPlanner createPlanner() {
    final VolcanoPlanner planner = new HiveVolcanoPlanner();
    planner.addRelTraitDef(ConventionTraitDef.INSTANCE);
    if (ENABLE_COLLATION_TRAIT) {
      planner.addRelTraitDef(RelCollationTraitDef.INSTANCE);
    }
    return planner;
  }
View Full Code Here

      org.eigenbase.relopt.Context externalContext,
      RelOptCostFactory costFactory) {
    if (externalContext == null) {
      externalContext = Contexts.withConfig(prepareContext.config());
    }
    final VolcanoPlanner planner =
        new VolcanoPlanner(costFactory, externalContext);
    planner.addRelTraitDef(ConventionTraitDef.INSTANCE);
    if (ENABLE_COLLATION_TRAIT) {
      planner.addRelTraitDef(RelCollationTraitDef.INSTANCE);
      planner.registerAbstractRelationalRules();
    }
    RelOptUtil.registerAbstractRels(planner);
    for (RelOptRule rule : DEFAULT_RULES) {
      planner.addRule(rule);
    }

    // Change the below to enable constant-reduction.
    if (false) {
      for (RelOptRule rule : CONSTANT_REDUCTION_RULES) {
        planner.addRule(rule);
      }
    }

    final SparkHandler spark = prepareContext.spark();
    if (spark.enabled()) {
View Full Code Here

    {
    LOG.debug( "implementing enumerable" );

    TableDef tableDef = getTapTable().getTableDef();

    VolcanoPlanner planner = (VolcanoPlanner) getCluster().getPlanner();

    if( pref == Prefer.CUSTOM )
      throw new RuntimeException( "cannot return custom format" );

    final PhysType physType = PhysTypeImpl.of( implementor.getTypeFactory(), table.getRowType(), JavaRowFormat.ARRAY );
View Full Code Here

    LOG.debug( "implementing enumerable" );

    CascadingRelNode input = (CascadingRelNode) getChild();
    Branch branch = input.visitChild( new Stack() );

    VolcanoPlanner planner = (VolcanoPlanner) getCluster().getPlanner();

    PhysType physType = PhysTypeImpl.of( implementor.getTypeFactory(), input.getRowType(), JavaRowFormat.ARRAY );

    BlockStatement block;
View Full Code Here

     * Creates a simple planner that can plan "select * from myTable" but not
     * much more.
     */
    protected RelOptPlanner createTapPlanner()
      {
      final VolcanoPlanner planner = new VolcanoPlanner();
      planner.addRelTraitDef( Cascading.CONVENTION.getTraitDef() );
      planner.addRelTraitDef( ConventionTraitDef.instance );
      planner.addRule( TableAccessRule.instance );
      planner.addRule( JavaRules.ENUMERABLE_CALC_RULE );
      planner.addRule( ProjectToCalcRule.instance );
      planner.addRule( EnumerableTapRule.INSTANCE );
      planner.setLocked( true ); // prevent further rules being added
      return planner;
      }
View Full Code Here

TOP

Related Classes of org.eigenbase.relopt.volcano.VolcanoPlanner$Provenance

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.