peter-toth commented on code in PR #10868: URL: https://github.com/apache/datafusion/pull/10868#discussion_r1638113803
########## datafusion/optimizer/src/common_subexpr_eliminate.rs: ########## @@ -166,6 +166,15 @@ impl CommonSubexprEliminate { ) -> Result<(Vec<Vec<Expr>>, LogicalPlan)> { let mut common_exprs = IndexMap::new(); + input.schema().iter().for_each(|(qualifier, field)| { Review Comment: But why do you want to fill the gaps? These are artifical aliases so having consecutive numbers has no use, all that matter is they are short, unique and easy to read. Also, if you don't inject anything into `common_exprs` then the pontless `#1 AS #1` aliases won't get added. -- 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