public CoGroupOperator(TransformationDescriptor<InputType0, Key> keyDescriptor0, TransformationDescriptor<InputType1, Key> keyDescriptor1, DataSetType<InputType0> inputType0, DataSetType<InputType1> inputType1) { super(inputType0, inputType1, CoGroupOperator.createOutputDataSetType(), true); this.keyDescriptor0 = keyDescriptor0; this.keyDescriptor1 = keyDescriptor1; }
/** * Copies an instance (exclusive of broadcasts). * * @param that that should be copied */ public CoGroupOperator(CoGroupOperator<InputType0, InputType1, Key> that) { super(that); this.keyDescriptor0 = that.getKeyDescriptor0(); this.keyDescriptor1 = that.getKeyDescriptor1(); }
private SubplanPattern createSubplanPattern() { final OperatorPattern operatorPattern = new OperatorPattern<>( "coGroup", new CoGroupOperator<>(null, null, DataSetType.none(), 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); // The current idea: We assume, we have a foreign-key like join // TODO: Find a better estimator. return Optional.of(new DefaultCardinalityEstimator( .5d, 2, this.isSupportingBroadcastInputs(), inputCards -> (long) (0.1 * (inputCards[0] + inputCards[1])) )); } }
private SubplanPattern createSubplanPattern() { final OperatorPattern operatorPattern = new OperatorPattern<>( "coGroup", new CoGroupOperator<>(null, null, DataSetType.none(), DataSetType.none()), false ); return SubplanPattern.createSingleton(operatorPattern); }
public CoGroupOperator(TransformationDescriptor<InputType0, Key> keyDescriptor0, TransformationDescriptor<InputType1, Key> keyDescriptor1) { super(DataSetType.createDefault(keyDescriptor0.getInputType()), DataSetType.createDefault(keyDescriptor1.getInputType()), CoGroupOperator.createOutputDataSetType(), true); this.keyDescriptor0 = keyDescriptor0; this.keyDescriptor1 = keyDescriptor1; } public CoGroupOperator(TransformationDescriptor<InputType0, Key> keyDescriptor0,