/** * Extracts the geometric mean values of the given {@link CardinalityEstimate}s. * * @param estimates the input {@link CardinalityEstimate}s * @return an array containing the average estimates * @see CardinalityEstimate#getGeometricMeanEstimate() */ private static long[] extractMeanValues(CardinalityEstimate[] estimates) { long[] averages = new long[estimates.length]; for (int i = 0; i < estimates.length; i++) { CardinalityEstimate inputEstimate = estimates[i]; if (inputEstimate == null) inputEstimate = CardinalityEstimate.EMPTY_ESTIMATE; averages[i] = inputEstimate.getGeometricMeanEstimate(); } return averages; }
int expectedNumElements0 = (int) cardinalityEstimate0.getGeometricMeanEstimate(); Map<KeyType, Collection<InputType0>> groups0 = new HashMap<>(expectedNumElements0); ((JavaChannelInstance) inputs[0]).<InputType0>provideStream().forEach(dataQuantum0 -> int expectedNumElements1 = (int) cardinalityEstimate1.getGeometricMeanEstimate(); Map<KeyType, Collection<InputType1>> groups1 = new HashMap<>(expectedNumElements1); ((JavaChannelInstance) inputs[1]).<InputType1>provideStream().forEach(dataQuantum1 ->
cardinalityEstimate0.getGeometricMeanEstimate() <= cardinalityEstimate1.getGeometricMeanEstimate(); (int) cardinalityEstimate0.getGeometricMeanEstimate(); Map<KeyType, Collection<InputType0>> probeTable = new HashMap<>(expectedNumElements); ((JavaChannelInstance) inputs[0]).<InputType0>provideStream().forEach(dataQuantum0 -> final int expectedNumElements = cardinalityEstimate1 == null ? 1000 : (int) cardinalityEstimate1.getGeometricMeanEstimate(); Map<KeyType, Collection<InputType1>> probeTable = new HashMap<>(expectedNumElements); ((JavaChannelInstance) inputs[1]).<InputType1>provideStream().forEach(dataQuantum1 ->
probingExecutionLineageNode.addPredecessor(materializedInput.getLineage()); } else if (operatorContext.getInputCardinality(0).getGeometricMeanEstimate() <= operatorContext.getInputCardinality(1).getGeometricMeanEstimate()) {
if (limit >= 0) { CardinalityEstimate cardinality = operatorContext.getInputCardinality(input.getIndex()); if (cardinality != null && cardinality.getGeometricMeanEstimate() > limit) return true; if (limit >= 0) { CardinalityEstimate cardinality = operatorContext.getOutputCardinality(output.getIndex()); if (cardinality != null && cardinality.getGeometricMeanEstimate() > limit) return true;