public LocalProperties filterByNodesConstantSet ( OptimizerNode node , int input ) { // check, whether the local order is preserved Ordering no = this . ordering ; FieldList ngf = this . groupedFields ; Set < FieldSet > nuf = this . uniqueFields ; if ( this . ordering != null ) { final FieldList involvedIndexes = this . ordering . getInvolvedIndexes ( ) ; for ( int i = 0 ; i < involvedIndexes . size ( ) ; i ++ ) { if ( ! node . isFieldConstant ( input , involvedIndexes . get ( i ) ) ) { if ( i == 0 ) { no = null ; ngf = null ; } else { no = this . ordering . createNewOrderingUpToIndex ( i ) ; ngf = no . getInvolvedIndexes ( ) ; } break ; } } } else if ( this . groupedFields != null ) { // check, whether the local key grouping is preserved for ( Integer index : this . groupedFields ) { if ( ! node . isFieldConstant ( input , index ) ) { ngf = null ; } } } // check, whether the local key grouping is preserved if ( this . uniqueFields != null ) { Set < FieldSet > s = new HashSet < FieldSet > ( this . uniqueFields ) ; for ( FieldSet fields : this . uniqueFields ) { for ( Integer index : fields ) { if ( ! node . isFieldConstant ( input , index ) ) { s . remove ( fields ) ; break ; } } } if ( s . size ( ) != this . uniqueFields . size ( ) ) { nuf = s ; } } return ( no == this . ordering && ngf == this . groupedFields && nuf == this . uniqueFields ) ? this : ( no == null && ngf == null && nuf == null ) ? new LocalProperties ( ) : new LocalProperties ( no , ngf , nuf ) ; }
Filters these properties by what can be preserved through a user function s constant fields set .