viirya edited a comment on pull request #1319: URL: https://github.com/apache/arrow-datafusion/pull/1319#issuecomment-974502648
Note that for the current approach that compares expression names, it works. The only issue is if we apply to all nodes there are many tests needed to be updated because many aliases are to be added there. E.g., 1. optimizer::constant_folding::tests::optimize_plan_support_projection ``` left: `"Projection: #test.a, #test.d, NOT #test.b AS test.b = Boolean(false)\n TableScan: test projection=None"`, right: `"Projection: #test.a, #test.d, NOT #test.b\n TableScan: test projection=None"` ``` 2. optimizer::constant_folding::tests::optimize_plan_and_expr ``` left: `"Projection: #test.a\n Filter: NOT #test.b AND #test.c AS test.b != Boolean(true) AND test.c = Boolean(true)\n TableScan: test projection=None"`, right: `"Projection: #test.a\n Filter: NOT #test.b AND #test.c\n TableScan: test projection=None"` ``` 3. optimizer::constant_folding::tests::optimize_plan_not_expr ``` left: `"Projection: #test.a\n Filter: #test.b AS NOT test.b = Boolean(false)\n TableScan: test projection=None"`, right: `"Projection: #test.a\n Filter: #test.b\n TableScan: test projection=None"`' ``` That's why I limit to certain nodes that I think mostly we like to add aliases to deal with projection push down rule. If you think this is okay, I can make it apply to all nodes and update these tests. -- 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...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org