Package net.hydromatic.optiq.rules.java.JavaRules

Examples of net.hydromatic.optiq.rules.java.JavaRules.EnumerableTableAccessRel



  @Override
  public void onMatch(RelOptRuleCall call) {
    final ProjectRel proj = (ProjectRel) call.rel(0);
    final EnumerableTableAccessRel scan = (EnumerableTableAccessRel) call.rel(1);

    try {
      ProjectPushInfo columnInfo = PrelUtil.getColumns(scan.getRowType(), proj.getProjects());

      if(columnInfo == null || columnInfo.isStarQuery() //
          || !scan.getTable().unwrap(DrillTable.class) //
          .getGroupScan().canPushdownProjects(columnInfo.columns)) return;

      final DrillScanRel newScan =
          new DrillScanRel(scan.getCluster(),
              scan.getTraitSet().plus(DrillRel.DRILL_LOGICAL),
              scan.getTable(),
              columnInfo.createNewRowType(proj.getChild().getCluster().getTypeFactory()),
              columnInfo.columns);


      List<RexNode> newProjects = Lists.newArrayList();
View Full Code Here


    super(RelOptHelper.any(EnumerableTableAccessRel.class), "DrillTableRule");
  }

  @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


  @Override
  public void onMatch(RelOptRuleCall call) {
    final ProjectRel proj = (ProjectRel) call.rel(0);
    final EnumerableTableAccessRel scan = (EnumerableTableAccessRel) call.rel(1);

    try {
      ProjectPushInfo columnInfo = PrelUtil.getColumns(scan.getRowType(), proj.getProjects());

      if (columnInfo == null || columnInfo.isStarQuery() //
          || !scan.getTable().unwrap(DrillTable.class) //
          .getGroupScan().canPushdownProjects(columnInfo.columns)) {
        return;
      }

      final DrillScanRel newScan =
          new DrillScanRel(scan.getCluster(),
              scan.getTraitSet().plus(DrillRel.DRILL_LOGICAL),
              scan.getTable(),
              columnInfo.createNewRowType(proj.getChild().getCluster().getTypeFactory()),
              columnInfo.columns);


      List<RexNode> newProjects = Lists.newArrayList();
View Full Code Here

    super(RelOptHelper.any(EnumerableTableAccessRel.class), "DrillTableRule");
  }

  @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

TOP

Related Classes of net.hydromatic.optiq.rules.java.JavaRules.EnumerableTableAccessRel

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.