Exemple #1
0
  // implement RelNode
  public RelOptCost computeSelfCost(RelOptPlanner planner) {
    double dRows = RelMetadataQuery.getRowCount(this);

    // Assume CPU is negligible since values are precomputed.
    double dCpu = 1;
    double dIo = 0;
    return planner.makeCost(dRows, dCpu, dIo);
  }
Exemple #2
0
 public RelOptCost computeSelfCost(RelOptPlanner planner) {
   double dRows = RelMetadataQuery.getRowCount(this);
   double dCpu = RelMetadataQuery.getRowCount(getChild()) * program.getExprCount();
   double dIo = 0;
   return planner.makeCost(dRows, dCpu, dIo);
 }