alamb commented on code in PR #4465:
URL: https://github.com/apache/arrow-datafusion/pull/4465#discussion_r1118073001
##########
datafusion/core/tests/sql/window.rs:
##########
@@ -1515,13 +1515,14 @@ async fn test_remove_unnecessary_sort_in_sub_query() ->
Result<()> {
" CoalescePartitionsExec",
" AggregateExec: mode=Partial, gby=[],
aggr=[COUNT(UInt8(1))]",
" RepartitionExec: partitioning=RoundRobinBatch(8),
input_partitions=8",
- " AggregateExec: mode=FinalPartitioned, gby=[c1@0 as c1],
aggr=[COUNT(UInt8(1))]",
+ " AggregateExec: mode=FinalPartitioned, gby=[c1@0 as c1],
aggr=[]",
Review Comment:
I don't understand this change -- why is there no aggregate anymore?
##########
datafusion/optimizer/src/push_down_projection.rs:
##########
@@ -710,12 +679,11 @@ mod tests {
let expected = "Projection: test.a, test.c, test.b\
\n Filter: test.a > Int32(1)\
\n Filter: test.b > Int32(1)\
- \n Filter: test.c > Int32(1)\
- \n TableScan: test projection=[a, b, c]";
-
- assert_optimized_plan_eq(&plan, expected);
-
- Ok(())
+ \n Projection: test.c, test.a, test.b\
Review Comment:
These projections above a Filter that just pass the input to the output are
also unecessary, right? Maybe we can add a rule to the remove unnecessary
projections for these as well (if the schema of the projection's input is the
same as the schema of its output)
--
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]