pub fn action(&self, relation: &mut MirRelationExpr) -> Result<(), crate::TransformError> {
        if let MirRelationExpr::TopK {
            input,
            group_key: _,
            order_key: _,
            limit,
            offset,
            monotonic: _,
        } = relation
        {
            if limit.is_none() && *offset == 0 {
                *relation = input.take_dangerous();
            } else if limit == &Some(0) {
                relation.take_safely();
            }
        }
        Ok(())
    }
/// Remove TopK operators with both an offset of zero and no limit.
Remove TopK operators with both an offset of zero and no limit.
Remove TopK operators with both an offset of zero and no limit .
pub fn action(&self, relation: &mut MirRelationExpr) -> Result<(), crate::TransformError> {
        if let MirRelationExpr::TopK {
            input,
            group_key: _,
            order_key: _,
            limit,
            offset,
            monotonic: _,
        } = relation
        {
            if limit.is_none() && *offset == 0 {
                *relation = input.take_dangerous();
            } else if limit == &Some(0) {
                relation.take_safely();
            }
        }
        Ok(())
    }
pub fn action ( & self , relation : & mut MirRelationExpr ) -> Result < ( ) , crate :: TransformError > { if let MirRelationExpr :: TopK { input , group_key : _ , order_key : _ , limit , offset , monotonic : _ , } = relation { if limit . is_none ( ) && * offset == 0 { * relation = input . take_dangerous ( ) ; } else if limit == & Some ( 0 ) { relation . take_safely ( ) ; } } Ok ( ( ) ) }
Remove TopK operators with both an offset of zero and no limit.
Remove TopK operators with both an offset of zero and no limit .
&self
relation
&mut MirRelationExpr
&self
relation
&mut MirRelationExpr