You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/11 22:11:41 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #2172: Add LogicalPlan::SubqueryAlias

alamb commented on code in PR #2172:
URL: https://github.com/apache/arrow-datafusion/pull/2172#discussion_r847773472


##########
datafusion/core/src/optimizer/projection_push_down.rs:
##########
@@ -432,6 +432,34 @@ fn optimize_plan(
                 alias: alias.clone(),
             }))
         }
+        LogicalPlan::SubqueryAlias(SubqueryAlias { input, alias, .. }) => {

Review Comment:
   is it worth a test for projection pushdown specifically?



##########
datafusion/core/src/sql/planner.rs:
##########
@@ -3458,7 +3458,8 @@ mod tests {
         let expected = "Projection: #person.first_name, #person.id\
         \n  Inner Join: Using #person.id = #person2.id\
         \n    TableScan: person projection=None\
-        \n    TableScan: person2 projection=None";
+        \n    SubqueryAlias: person2\

Review Comment:
   the appearance of `SubqueryAlias` in this query is  somewhat strange to me as there is no subquery in this SQL (maybe a better name is `RelationAlias` or something)?



-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org