alamb commented on pull request #9692:
URL: https://github.com/apache/arrow/pull/9692#issuecomment-798900651


   @Dandandan  and @houqp 
   
   What do you think about something like this (which is even more Idiomatic 
(TM) I think), though harder for beginner Rust programmers to grok? 
   
   ```
       pub fn project(&self, expr: impl IntoIterator<Item=Expr>) -> 
Result<Self> {
   ```
   
   This would allow `PlanBuilder::project` to be called with a `Vec<Expr>` as 
well as things like `BTreeSet<Expr>`...
   
   
   Sadly, I couldn't give the same treatment to the `DataFrame` trait as when I 
tried,  `rustc` started complaining to me about trait objects
   
   ```
   dataframe::DataFrame` cannot be made into an object
      |
      = help: consider moving `select` to another trait
   note: for a trait to be "object safe" it needs to allow building a vtable to 
allow the call to be resolvable dynamically; for more information visit 
<https://doc.rust-lang.org/reference/items/traits.html#object-safety>
   ```


----------------------------------------------------------------
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:
[email protected]


Reply via email to