public boolean isPredicatesOptimizableForAggregate ( ) { // for reverse scan, need to examine "added" predicates List < AbstractExpression > predicates = ExpressionUtil . uncombinePredicate ( m_predicate ) ; // if the size of predicates doesn't equal 1, can't be our added artifact predicates if ( predicates . size ( ) != 1 ) { return false ; } // examin the possible "added" predicates: NOT NULL expr. AbstractExpression expr = predicates . get ( 0 ) ; if ( expr . getExpressionType ( ) != ExpressionType . OPERATOR_NOT ) { return false ; } if ( expr . getLeft ( ) . getExpressionType ( ) != ExpressionType . OPERATOR_IS_NULL ) { return false ; } // Not reverse scan. if ( m_lookupType != IndexLookupType . LT && m_lookupType != IndexLookupType . LTE ) { return false ; } return true ; }
added for reverse scan purpose only