public DataSetType<Type> getType() { return this.getInputType(); }
@Override @SuppressWarnings("unchecked") protected Operator translate(SubplanMatch subplanMatch, int epoch) { final ReduceOperator reduce = (ReduceOperator) subplanMatch.getMatch("reduce").getOperator(); return new GlobalReduceOperator<>( reduce.getReduceDescriptor(), reduce.getInputType() ).at(epoch); } }
private SubplanPattern createSubplanPattern() { final OperatorPattern operatorPattern = new OperatorPattern( "reduce", new GlobalReduceOperator<>(null, DataSetType.none()), false ); return SubplanPattern.createSingleton(operatorPattern); }
@Override public Optional<CardinalityEstimator> createCardinalityEstimator( final int outputIndex, final Configuration configuration) { Validate.inclusiveBetween(0, this.getNumOutputs() - 1, outputIndex); // TODO: Come up with a decent way to estimate the "distinctness" of reduction keys. return Optional.of(new FixedSizeCardinalityEstimator(1)); } }
private SubplanPattern createSubplanPattern() { final OperatorPattern operatorPattern = new OperatorPattern( "reduce", new GlobalReduceOperator<>(null, DataSetType.none()), false); return SubplanPattern.createSingleton(operatorPattern); }