Blizzara commented on code in PR #15211: URL: https://github.com/apache/datafusion/pull/15211#discussion_r2004258327
########## datafusion/substrait/src/logical_plan/consumer.rs: ########## @@ -1074,6 +1074,9 @@ pub async fn from_project_rel( // leaving only explicit expressions. let mut explicit_exprs: Vec<Expr> = vec![]; + // For WindowFunctions, we need to wrap them in a Window relation. If there are duplicates, + // we can do the window'ing only once, then the project will duplicate the result. + let mut window_exprs: HashSet<Expr> = HashSet::new(); Review Comment: Actually no, the ordering we use here doesn't matter, since the LogicalPlanBuilder::window_plan calls `group_window_expr_by_sort_keys` which sorts the expressions anyways. At least I think so. So I just added a comment to note that: https://github.com/apache/datafusion/pull/15211/commits/696bf5d95980f5bbcdd3809d1d0944a63f18588b -- 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