berkaysynnada commented on code in PR #17337: URL: https://github.com/apache/datafusion/pull/17337#discussion_r2327167687
########## datafusion/expr/src/logical_plan/plan.rs: ########## @@ -2525,6 +2525,8 @@ pub struct TableScan { pub filters: Vec<Expr>, /// Optional number of rows to read pub fetch: Option<usize>, + /// Optional preferred ordering for the scan + pub preferred_ordering: Option<Vec<SortExpr>>, Review Comment: > @berkaysynnada do you think this is the right information to pass down? Or is there a world where it makes sense to pass down some sort of "equivalence" information? > > cc @alamb When we are registering the sources, we can provide multiple orderings if the table supports them. However, the requirements are singular, and I don't think there would be any meaning in ordering the table for both `col_a` and `col_b` simultaneously. So, I've always thought that requirements need only one ordering, but specs should be capable of having multiple orderings. So there isn't any obvious advantage of using equivalences here, IMO -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org