test_class.file: flink-optimizer/src/test/java/org/apache/flink/optimizer/dag/GroupReduceNodeTest.java
test_class.identifier: GroupReduceNodeTest
test_case.body: @Test
  	public void testGetSemanticProperties() {
  
  		SingleInputSemanticProperties origProps = new SingleInputSemanticProperties();
  		origProps.addForwardedField(0, 1);
  		origProps.addForwardedField(2, 2);
  		origProps.addForwardedField(3, 4);
  		origProps.addForwardedField(6, 0);
  		origProps.addReadFields(new FieldSet(0, 2, 4, 7));
  
  		GroupReduceOperatorBase<?,?,?> op = mock(GroupReduceOperatorBase.class);
  		when(op.getSemanticProperties()).thenReturn(origProps);
  		when(op.getKeyColumns(0)).thenReturn(new int[]{3,2});
  		when(op.getParameters()).thenReturn(new Configuration());
  
  		GroupReduceNode node = new GroupReduceNode(op);
  
  		SemanticProperties filteredProps = node.getSemanticPropertiesForLocalPropertyFiltering();
  
  		assertTrue(filteredProps.getForwardingTargetFields(0, 0).size() == 0);
  		assertTrue(filteredProps.getForwardingTargetFields(0, 2).size() == 1);
  		assertTrue(filteredProps.getForwardingTargetFields(0, 2).contains(2));
  		assertTrue(filteredProps.getForwardingTargetFields(0, 3).size() == 1);
  		assertTrue(filteredProps.getForwardingTargetFields(0, 3).contains(4));
  		assertTrue(filteredProps.getForwardingTargetFields(0, 6).size() == 0);
  		assertTrue(filteredProps.getForwardingSourceField(0, 1) < 0);
  		assertTrue(filteredProps.getForwardingSourceField(0, 2) == 2);
  		assertTrue(filteredProps.getForwardingSourceField(0, 4) == 3);
  		assertTrue(filteredProps.getForwardingSourceField(0, 0) < 0);
  
  		assertTrue(filteredProps.getReadFields(0).size() == 4);
  		assertTrue(filteredProps.getReadFields(0).contains(0));
  		assertTrue(filteredProps.getReadFields(0).contains(2));
  		assertTrue(filteredProps.getReadFields(0).contains(4));
  		assertTrue(filteredProps.getReadFields(0).contains(7));
  
  	}
test_case.class_method_signature: GroupReduceNodeTest.testGetSemanticProperties()
test_case.full_signature: @Test public void testGetSemanticProperties()
test_case.identifier: testGetSemanticProperties
test_case.invocations: addForwardedField addForwardedField addForwardedField addForwardedField addReadFields mock thenReturn when getSemanticProperties thenReturn when getKeyColumns thenReturn when getParameters getSemanticPropertiesForLocalPropertyFiltering assertTrue size getForwardingTargetFields assertTrue size getForwardingTargetFields assertTrue contains getForwardingTargetFields assertTrue size getForwardingTargetFields assertTrue contains getForwardingTargetFields assertTrue size getForwardingTargetFields assertTrue getForwardingSourceField assertTrue getForwardingSourceField assertTrue getForwardingSourceField assertTrue getForwardingSourceField assertTrue size getReadFields assertTrue contains getReadFields assertTrue contains getReadFields assertTrue contains getReadFields assertTrue contains getReadFields
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetSemanticProperties()
focal_class.declarator: possibleProperties
focal_class.modifier: private final
focal_class.original_string: private final List<OperatorDescriptorSingle> possibleProperties;
focal_class.type: List<OperatorDescriptorSingle>
focal_class.var_name: possibleProperties
focal_class.declarator: operatorName
focal_class.modifier: private final
focal_class.original_string: private final String operatorName;
focal_class.type: String
focal_class.var_name: operatorName
focal_class.declarator: combinerUtilityNode
focal_class.modifier: private
focal_class.original_string: private GroupReduceNode combinerUtilityNode;
focal_class.type: GroupReduceNode
focal_class.var_name: combinerUtilityNode
focal_class.file: flink-optimizer/src/main/java/org/apache/flink/optimizer/dag/GroupReduceNode.java
focal_class.identifier: GroupReduceNode
focal_class.class_method_signature: GroupReduceNode.GroupReduceNode(GroupReduceOperatorBase<?, ?, ?> operator)
focal_class.full_signature: public  GroupReduceNode(GroupReduceOperatorBase<?, ?, ?> operator)
focal_class.identifier: GroupReduceNode
focal_class.modifiers: public
focal_class.parameters: (GroupReduceOperatorBase<?, ?, ?> operator)
focal_class.signature:  GroupReduceNode(GroupReduceOperatorBase<?, ?, ?> operator)
focal_class.class_method_signature: GroupReduceNode.GroupReduceNode(GroupReduceNode reducerToCopyForCombiner)
focal_class.full_signature: private  GroupReduceNode(GroupReduceNode reducerToCopyForCombiner)
focal_class.identifier: GroupReduceNode
focal_class.modifiers: private
focal_class.parameters: (GroupReduceNode reducerToCopyForCombiner)
focal_class.signature:  GroupReduceNode(GroupReduceNode reducerToCopyForCombiner)
focal_class.class_method_signature: GroupReduceNode.initPossibleProperties(Partitioner<?> customPartitioner)
focal_class.full_signature: private List<OperatorDescriptorSingle> initPossibleProperties(Partitioner<?> customPartitioner)
focal_class.identifier: initPossibleProperties
focal_class.modifiers: private
focal_class.parameters: (Partitioner<?> customPartitioner)
focal_class.return: List<OperatorDescriptorSingle>
focal_class.signature: List<OperatorDescriptorSingle> initPossibleProperties(Partitioner<?> customPartitioner)
focal_class.class_method_signature: GroupReduceNode.getOperator()
focal_class.full_signature: @Override public GroupReduceOperatorBase<?, ?, ?> getOperator()
focal_class.identifier: getOperator
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: GroupReduceOperatorBase<?, ?, ?>
focal_class.signature: GroupReduceOperatorBase<?, ?, ?> getOperator()
focal_class.class_method_signature: GroupReduceNode.isCombineable()
focal_class.full_signature: public boolean isCombineable()
focal_class.identifier: isCombineable
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isCombineable()
focal_class.class_method_signature: GroupReduceNode.getOperatorName()
focal_class.full_signature: @Override public String getOperatorName()
focal_class.identifier: getOperatorName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getOperatorName()
focal_class.class_method_signature: GroupReduceNode.getPossibleProperties()
focal_class.full_signature: @Override protected List<OperatorDescriptorSingle> getPossibleProperties()
focal_class.identifier: getPossibleProperties
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: List<OperatorDescriptorSingle>
focal_class.signature: List<OperatorDescriptorSingle> getPossibleProperties()
focal_class.class_method_signature: GroupReduceNode.getSemanticPropertiesForLocalPropertyFiltering()
focal_class.full_signature: @Override protected SemanticProperties getSemanticPropertiesForLocalPropertyFiltering()
focal_class.identifier: getSemanticPropertiesForLocalPropertyFiltering
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: SemanticProperties
focal_class.signature: SemanticProperties getSemanticPropertiesForLocalPropertyFiltering()
focal_class.class_method_signature: GroupReduceNode.computeOperatorSpecificDefaultEstimates(DataStatistics statistics)
focal_class.full_signature: @Override protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics)
focal_class.identifier: computeOperatorSpecificDefaultEstimates
focal_class.modifiers: @Override protected
focal_class.parameters: (DataStatistics statistics)
focal_class.return: void
focal_class.signature: void computeOperatorSpecificDefaultEstimates(DataStatistics statistics)
focal_class.class_method_signature: GroupReduceNode.getCombinerUtilityNode()
focal_class.full_signature: public GroupReduceNode getCombinerUtilityNode()
focal_class.identifier: getCombinerUtilityNode
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: GroupReduceNode
focal_class.signature: GroupReduceNode getCombinerUtilityNode()
focal_class.superclass: extends SingleInputNode
focal_method.body: @Override
  	protected SemanticProperties getSemanticPropertiesForLocalPropertyFiltering() {
  		// Local properties for GroupReduce may only be preserved on key fields.
  		SingleInputSemanticProperties origProps = getOperator().getSemanticProperties();
  		SingleInputSemanticProperties filteredProps = new SingleInputSemanticProperties();
  		FieldSet readSet = origProps.getReadFields(0);
  		if(readSet != null) {
  			filteredProps.addReadFields(readSet);
  		}
  
  		// only add forward field information for key fields
  		if(this.keys != null) {
  			for (int f : this.keys) {
  				FieldSet targets = origProps.getForwardingTargetFields(0, f);
  				for (int t : targets) {
  					filteredProps.addForwardedField(f, t);
  				}
  			}
  		}
  		return filteredProps;
  	}
focal_method.class_method_signature: GroupReduceNode.getSemanticPropertiesForLocalPropertyFiltering()
focal_method.full_signature: @Override protected SemanticProperties getSemanticPropertiesForLocalPropertyFiltering()
focal_method.identifier: getSemanticPropertiesForLocalPropertyFiltering
focal_method.invocations: getSemanticProperties getOperator getReadFields addReadFields getForwardingTargetFields addForwardedField
focal_method.modifiers: @Override protected
focal_method.parameters: ()
focal_method.return: SemanticProperties
focal_method.signature: SemanticProperties getSemanticPropertiesForLocalPropertyFiltering()