public RelOptCost plus(RelOptCost other) { if ((this == INFINITY) || (other.isInfinite())) { return INFINITY; } return new HiveCost(this.rowCount + other.getRows(), this.cpu + other.getCpu(), this.io + other.getIo()); }
public RelOptCost plus(RelOptCost other) { if ((this == INFINITY) || (other.isInfinite())) { return INFINITY; } return new HiveCost(this.rowCount + other.getRows(), this.cpu + other.getCpu(), this.io + other.getIo()); }
/** * Converts a cost to a scalar quantity. */ private double toDouble(RelOptCost cost) { if (cost.isInfinite()) { return 1e+30; } else { return cost.getCpu() + cost.getRows() + cost.getIo(); } }
/** * Converts a cost to a scalar quantity. */ private double toDouble(RelOptCost cost) { if (cost.isInfinite()) { return 1e+30; } else { return cost.getCpu() + cost.getRows() + cost.getIo(); } }
public RelOptCost plus(RelOptCost other) { if ((this == INFINITY) || (other.isInfinite())) { return INFINITY; } return new HiveCost(this.rowCount + other.getRows(), this.cpu + other.getCpu(), this.io + other.getIo()); }
Convention previous = null; for (Convention arc : conversionPath) { if (planner.getCost(converted, mq).isInfinite() && !allowInfiniteCostConverters) { continue loop;
Convention previous = null; for (Convention arc : conversionPath) { if (planner.getCost(converted, mq).isInfinite() && !allowInfiniteCostConverters) { continue loop;
} else if (root.bestCost.isInfinite() && ((tick % 10) == 0)) { injectImportanceBoost();
} else if (root.bestCost.isInfinite() && ((tick % 10) == 0)) { injectImportanceBoost();
public RelNode convert( RelOptPlanner planner, RelNode rel, AltTrait toTrait, boolean allowInfiniteCostConverters) { RelTrait fromTrait = rel.getTraitSet().getTrait(this); if (conversionMap.containsKey(fromTrait)) { final RelMetadataQuery mq = RelMetadataQuery.instance(); for (Pair<RelTrait, ConverterRule> traitAndRule : conversionMap.get(fromTrait)) { RelTrait trait = traitAndRule.left; ConverterRule rule = traitAndRule.right; if (trait == toTrait) { RelNode converted = rule.convert(rel); if ((converted != null) && (!planner.getCost(converted, mq).isInfinite() || allowInfiniteCostConverters)) { return converted; } } } } return null; }
public RelNode convert( RelOptPlanner planner, RelNode rel, AltTrait toTrait, boolean allowInfiniteCostConverters) { RelTrait fromTrait = rel.getTraitSet().getTrait(this); if (conversionMap.containsKey(fromTrait)) { final RelMetadataQuery mq = RelMetadataQuery.instance(); for (Pair<RelTrait, ConverterRule> traitAndRule : conversionMap.get(fromTrait)) { RelTrait trait = traitAndRule.left; ConverterRule rule = traitAndRule.right; if (trait == toTrait) { RelNode converted = rule.convert(rel); if ((converted != null) && (!planner.getCost(converted, mq).isInfinite() || allowInfiniteCostConverters)) { return converted; } } } } return null; }