private List<OperatorDescriptorDual> initializeDataProperties() { Ordering groupOrder1 = null; Ordering groupOrder2 = null; CoGroupRawOperatorBase<?, ?, ?, ?> cgc = getOperator(); groupOrder1 = cgc.getGroupOrderForInputOne(); groupOrder2 = cgc.getGroupOrderForInputTwo(); if (groupOrder1 != null && groupOrder1.getNumberOfFields() == 0) { groupOrder1 = null; } if (groupOrder2 != null && groupOrder2.getNumberOfFields() == 0) { groupOrder2 = null; } return Collections.<OperatorDescriptorDual>singletonList(new CoGroupRawDescriptor(this.keys1, this.keys2, groupOrder1, groupOrder2)); } }
/** * Gets the order of elements within a group for the first input. * If no such order has been set, this method returns null. * * @return The group order for the first input. */ public Ordering getGroupOrderForInputOne() { return getGroupOrder(0); }
TypeInformation<IN1> inputType1 = getOperatorInfo().getFirstInputType(); TypeInformation<IN2> inputType2 = getOperatorInfo().getSecondInputType(); int[] inputKeys1 = getKeyColumns(0); int[] inputKeys2 = getKeyColumns(1); final TypeSerializer<IN2> inputSerializer2 = inputType2.createSerializer(executionConfig); final TypeComparator<IN1> inputComparator1 = getTypeComparator(executionConfig, inputType1, inputKeys1, inputSortDirections1); final TypeComparator<IN2> inputComparator2 = getTypeComparator(executionConfig, inputType2, inputKeys2, inputSortDirections2); Collector<OUT> resultCollector = new CopyingListCollector<OUT>(result, getOperatorInfo().getOutputType().createSerializer(executionConfig));
int[] logicalKeyPositions2 = keys2.computeLogicalKeyPositions(); CoGroupRawOperatorBase<I1, I2, OUT, CoGroupFunction<I1, I2, OUT>> po = new CoGroupRawOperatorBase<>( function, new BinaryOperatorInformation<>(getInput1Type(), getInput2Type(), getResultType()), po.setFirstInput(input1); po.setSecondInput(input2); po.setParallelism(this.getParallelism());
/** * Sets the order of the elements within a group for the first input. * * @param order The order for the elements in a group. */ public void setGroupOrderForInputOne(Ordering order) { setGroupOrder(0, order); }
int[] logicalKeyPositions2 = keys2.computeLogicalKeyPositions(); CoGroupRawOperatorBase<I1, I2, OUT, CoGroupFunction<I1, I2, OUT>> po = new CoGroupRawOperatorBase<>( function, new BinaryOperatorInformation<>(getInput1Type(), getInput2Type(), getResultType()), po.setFirstInput(input1); po.setSecondInput(input2); po.setParallelism(this.getParallelism());
/** * Sets the order of the elements within a group for the second input. * * @param order The order for the elements in a group. */ public void setGroupOrderForInputTwo(Ordering order) { setGroupOrder(1, order); }
private List<OperatorDescriptorDual> initializeDataProperties() { Ordering groupOrder1 = null; Ordering groupOrder2 = null; CoGroupRawOperatorBase<?, ?, ?, ?> cgc = getOperator(); groupOrder1 = cgc.getGroupOrderForInputOne(); groupOrder2 = cgc.getGroupOrderForInputTwo(); if (groupOrder1 != null && groupOrder1.getNumberOfFields() == 0) { groupOrder1 = null; } if (groupOrder2 != null && groupOrder2.getNumberOfFields() == 0) { groupOrder2 = null; } return Collections.<OperatorDescriptorDual>singletonList(new CoGroupRawDescriptor(this.keys1, this.keys2, groupOrder1, groupOrder2)); } }
int[] logicalKeyPositions2 = keys2.computeLogicalKeyPositions(); CoGroupRawOperatorBase<I1, I2, OUT, CoGroupFunction<I1, I2, OUT>> po = new CoGroupRawOperatorBase<>( function, new BinaryOperatorInformation<>(getInput1Type(), getInput2Type(), getResultType()), po.setFirstInput(input1); po.setSecondInput(input2); po.setParallelism(this.getParallelism());
TypeInformation<IN1> inputType1 = getOperatorInfo().getFirstInputType(); TypeInformation<IN2> inputType2 = getOperatorInfo().getSecondInputType(); int[] inputKeys1 = getKeyColumns(0); int[] inputKeys2 = getKeyColumns(1); final TypeSerializer<IN2> inputSerializer2 = inputType2.createSerializer(executionConfig); final TypeComparator<IN1> inputComparator1 = getTypeComparator(executionConfig, inputType1, inputKeys1, inputSortDirections1); final TypeComparator<IN2> inputComparator2 = getTypeComparator(executionConfig, inputType2, inputKeys2, inputSortDirections2); Collector<OUT> resultCollector = new CopyingListCollector<OUT>(result, getOperatorInfo().getOutputType().createSerializer(executionConfig));
/** * Sets the order of the elements within a group for the first input. * * @param order The order for the elements in a group. */ public void setGroupOrderForInputOne(Ordering order) { setGroupOrder(0, order); }
/** * Gets the order of elements within a group for the second input. * If no such order has been set, this method returns null. * * @return The group order for the second input. */ public Ordering getGroupOrderForInputTwo() { return getGroupOrder(1); }
private List<OperatorDescriptorDual> initializeDataProperties() { Ordering groupOrder1 = null; Ordering groupOrder2 = null; CoGroupRawOperatorBase<?, ?, ?, ?> cgc = getOperator(); groupOrder1 = cgc.getGroupOrderForInputOne(); groupOrder2 = cgc.getGroupOrderForInputTwo(); if (groupOrder1 != null && groupOrder1.getNumberOfFields() == 0) { groupOrder1 = null; } if (groupOrder2 != null && groupOrder2.getNumberOfFields() == 0) { groupOrder2 = null; } return Collections.<OperatorDescriptorDual>singletonList(new CoGroupRawDescriptor(this.keys1, this.keys2, groupOrder1, groupOrder2)); } }
TypeInformation<IN1> inputType1 = getOperatorInfo().getFirstInputType(); TypeInformation<IN2> inputType2 = getOperatorInfo().getSecondInputType(); int[] inputKeys1 = getKeyColumns(0); int[] inputKeys2 = getKeyColumns(1); final TypeSerializer<IN2> inputSerializer2 = inputType2.createSerializer(executionConfig); final TypeComparator<IN1> inputComparator1 = getTypeComparator(executionConfig, inputType1, inputKeys1, inputSortDirections1); final TypeComparator<IN2> inputComparator2 = getTypeComparator(executionConfig, inputType2, inputKeys2, inputSortDirections2); Collector<OUT> resultCollector = new CopyingListCollector<OUT>(result, getOperatorInfo().getOutputType().createSerializer(executionConfig));
/** * Sets the order of the elements within a group for the first input. * * @param order The order for the elements in a group. */ public void setGroupOrderForInputOne(Ordering order) { setGroupOrder(0, order); }
/** * Gets the order of elements within a group for the second input. * If no such order has been set, this method returns null. * * @return The group order for the second input. */ public Ordering getGroupOrderForInputTwo() { return getGroupOrder(1); }
private List<OperatorDescriptorDual> initializeDataProperties() { Ordering groupOrder1 = null; Ordering groupOrder2 = null; CoGroupRawOperatorBase<?, ?, ?, ?> cgc = getOperator(); groupOrder1 = cgc.getGroupOrderForInputOne(); groupOrder2 = cgc.getGroupOrderForInputTwo(); if (groupOrder1 != null && groupOrder1.getNumberOfFields() == 0) { groupOrder1 = null; } if (groupOrder2 != null && groupOrder2.getNumberOfFields() == 0) { groupOrder2 = null; } return Collections.<OperatorDescriptorDual>singletonList(new CoGroupRawDescriptor(this.keys1, this.keys2, groupOrder1, groupOrder2)); } }
/** * Sets the order of the elements within a group for the second input. * * @param order The order for the elements in a group. */ public void setGroupOrderForInputTwo(Ordering order) { setGroupOrder(1, order); }
/** * Gets the order of elements within a group for the second input. * If no such order has been set, this method returns null. * * @return The group order for the second input. */ public Ordering getGroupOrderForInputTwo() { return getGroupOrder(1); }
private List<OperatorDescriptorDual> initializeDataProperties() { Ordering groupOrder1 = null; Ordering groupOrder2 = null; CoGroupRawOperatorBase<?, ?, ?, ?> cgc = getOperator(); groupOrder1 = cgc.getGroupOrderForInputOne(); groupOrder2 = cgc.getGroupOrderForInputTwo(); if (groupOrder1 != null && groupOrder1.getNumberOfFields() == 0) { groupOrder1 = null; } if (groupOrder2 != null && groupOrder2.getNumberOfFields() == 0) { groupOrder2 = null; } return Collections.<OperatorDescriptorDual>singletonList(new CoGroupRawDescriptor(this.keys1, this.keys2, groupOrder1, groupOrder2)); } }