You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/05/30 17:14:29 UTC

[GitHub] [arrow-datafusion] Jimexist opened a new issue #448: use a more rust idiomatic way of handling nth_value

Jimexist opened a new issue #448:
URL: https://github.com/apache/arrow-datafusion/issues/448


   I wonder if a more idomatic Rust way of doing this would be an enum like
   
   ```rust
   enum NthValue {
     First,
     Last,
     Nth(u32)
   }
   
   ```
   
   And then in `NthValueAccumulator::scan` you would have something like
   
   ```
   match self.n {
     NthValue::First|NthValue::Nth(1)  => {...}
     Nth::Last => {..}
   }
   ```
   
   There is nothing wrong with the special value approach either -- I just figured I would point it out
   
   _Originally posted by @alamb in https://github.com/apache/arrow-datafusion/pull/403#r640837938_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow-datafusion] alamb closed issue #448: use a more rust idiomatic way of handling nth_value

Posted by GitBox <gi...@apache.org>.
alamb closed issue #448:
URL: https://github.com/apache/arrow-datafusion/issues/448


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org