phillipleblanc commented on code in PR #12331: URL: https://github.com/apache/datafusion/pull/12331#discussion_r1744845781
########## datafusion/sql/src/unparser/plan.rs: ########## @@ -450,10 +453,33 @@ impl Unparser<'_> { Ok(()) } LogicalPlan::SubqueryAlias(plan_alias) => { - // Handle bottom-up to allocate relation - let (plan, columns) = subquery_alias_inner_query_and_columns(plan_alias); + let (plan, mut columns) = + subquery_alias_inner_query_and_columns(plan_alias); + + if !columns.is_empty() + && !self.dialect.supports_column_alias_in_table_alias() + { + // if columns are returned than plan corresponds to a projection Review Comment: ```suggestion // if columns are returned then the plan corresponds to a projection ``` -- 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