/** * Push the input {@link CardinalityEstimate}s of the {@code operatorContext} to the output {@link CardinalityEstimate}s. * If that leaded to an update, also update the {@link TimeEstimate}. * * @param opCtx will be subject to the push * @param configuration potentially provides some estimation helpers * @return whether an update of the {@link CardinalityEstimate}s took place */ public boolean push(OptimizationContext.OperatorContext opCtx, Configuration configuration) { assert opCtx != null; this.logger.trace("Pushing through {}.", opCtx.getOperator()); assert Arrays.stream(this.relevantInputIndices).mapToObj(opCtx::getInputCardinality).noneMatch(Objects::isNull) : String.format("Incomplete input cardinalities for %s.", opCtx.getOperator()); if (!this.canUpdate(opCtx)) { return false; } if (this.logger.isTraceEnabled()) { this.logger.trace("Pushing {} into {}.", Arrays.toString(opCtx.getInputCardinalities()), opCtx.getOperator()); } this.doPush(opCtx, configuration); opCtx.updateCostEstimate(); return true; }