avantgardnerio commented on PR #5362:
URL: 
https://github.com/apache/arrow-datafusion/pull/5362#issuecomment-1441989689

   > not sure if this PR's interface is ideal for that scenario
   
   I had anticipated that this signature would solicit the above response:
   
   ```
   fn ordered_indexes(&self) -> Result<Vec<Vec<(Column, SortOptions)>>>
   ```
   
   But was hoping that by submitting the PR we could begin the discussion of 
what would be better, i.e.:
   
   ```
   enum Cost {
      LogN,
      MLogN,
      Etc
   }
   
   struct OrderedIndex {
       columns: Vec<Column>,
       cost_per_row: Cost
   }
   
   fn ordered_indexes(&self) -> Result<Vec<OrderedIndex>>
   ```
   
   > modeling the different paths as different TableProviders
   
   That is a surprising (to me) way of modelling it, and why submitting the PR 
early seemed like the best approach (so we could converge our understandings 
early). 
   
   The reason it is surprising to me is that all of the various TableProviders 
would represent the same underlying data, have the same schema & name, etc. I 
understand this might be easier to fit into the existing planner, but I'm not 
sure how we would over come these issues, particularly duplicate names?


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to