[DISCUSS][SPIP] Subexpression elimination supporting more physical operators

2023-03-07 Thread
Hi everyone, I would like to start a discussion on "Subexpression elimination supporting more physical operators" Now spark only support subexpression elimination in ProjectExec and AggregateExec. We can support improve subexpression elimination framework to support more physical operato

Could we reorder the second aggregate node and the expand node when rewriting multiple distinct

2023-01-03 Thread
Hello, Spark sql rule RewriteDistinctAggregates will rewrite multiple distinct expressions into two Aggregate nodes and a expand node. The follow is the example in the class documentation, I wander if we can reorder the second Aggregate node and the expand node and make the expand generate fe