private boolean canPushdownLimit ( ) { boolean limitCanPushdown = ( m_limitOffset . hasLimit ( ) && ! m_distinct ) ; if ( limitCanPushdown ) { for ( ParsedColInfo col : m_displayColumns ) { AbstractExpression rootExpr = col . m_expression ; if ( rootExpr instanceof AggregateExpression ) { if ( ( ( AggregateExpression ) rootExpr ) . isDistinct ( ) ) { limitCanPushdown = false ; break ; } } } } return limitCanPushdown ; }
Check if the LimitPlanNode can be pushed down . The LimitPlanNode may have a LIMIT clause only OFFSET clause only or both . Offset only cannot be pushed down .