goldmedal commented on code in PR #15159:
URL: https://github.com/apache/datafusion/pull/15159#discussion_r1991567742
##########
datafusion/sql/src/unparser/plan.rs:
##########
@@ -377,8 +377,17 @@ impl Unparser<'_> {
};
if self.dialect.unnest_as_table_factor() &&
unnest_input_type.is_some() {
if let LogicalPlan::Unnest(unnest) = &p.input.as_ref() {
- return self
- .unnest_to_table_factor_sql(unnest, query, select,
relation);
+ if let LogicalPlan::Projection(projection) =
unnest.input.as_ref()
+ {
+ if matches!(
+ projection.input.as_ref(),
+ LogicalPlan::EmptyRelation(_)
Review Comment:
It's better to add some comments to explain why we match `EmptyRelation`.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]