public RequestedLocalProperties filterBySemanticProperties(SemanticProperties props, int input) {

		// no semantic properties, all local properties are filtered
		if (props == null) {
			throw new NullPointerException("SemanticProperties may not be null.");
		}

		if (this.ordering != null) {
			Ordering newOrdering = new Ordering();

			for (int i = 0; i < this.ordering.getInvolvedIndexes().size(); i++) {
				int targetField = this.ordering.getInvolvedIndexes().get(i);
				int sourceField = props.getForwardingSourceField(input, targetField);
				if (sourceField >= 0) {
					newOrdering.appendOrdering(sourceField, this.ordering.getType(i), this.ordering.getOrder(i));
				} else {
					return null;
				}
			}
			return new RequestedLocalProperties(newOrdering);

		} else if (this.groupedFields != null) {
			FieldSet newGrouping = new FieldSet();

			// check, whether the local key grouping is preserved
			for (Integer targetField : this.groupedFields) {
				int sourceField = props.getForwardingSourceField(input, targetField);
				if (sourceField >= 0) {
					newGrouping = newGrouping.addField(sourceField);
				} else {
					return null;
				}
			}
			return new RequestedLocalProperties(newGrouping);
		} else {
			return null;
		}
	}
public RequestedLocalProperties filterBySemanticProperties ( SemanticProperties props , int input ) { if ( props == null ) { throw new NullPointerException ( "SemanticProperties may not be null." ) ; } if ( this . ordering != null ) { Ordering newOrdering = new Ordering ( ) ; for ( int i = 0 ; i < this . ordering . getInvolvedIndexes ( ) . size ( ) ; i ++ ) { int targetField = this . ordering . getInvolvedIndexes ( ) . get ( i ) ; int sourceField = props . getForwardingSourceField ( input , targetField ) ; if ( sourceField >= 0 ) { newOrdering . appendOrdering ( sourceField , this . ordering . getType ( i ) , this . ordering . getOrder ( i ) ) ; } else { return null ; } } return new RequestedLocalProperties ( newOrdering ) ; } else if ( this . groupedFields != null ) { FieldSet newGrouping = new FieldSet ( ) ; for ( Integer targetField : this . groupedFields ) { int sourceField = props . getForwardingSourceField ( input , targetField ) ; if ( sourceField >= 0 ) { newGrouping = newGrouping . addField ( sourceField ) ; } else { return null ; } } return new RequestedLocalProperties ( newGrouping ) ; } else { return null ; } }
Filters these properties by what can be preserved by the given SemanticProperties when propagated down
to the given input.

@param props The SemanticProperties which define which fields are preserved.
@param input The index of the operator's input.
@return The filtered RequestedLocalProperties