blaginin commented on code in PR #14781:
URL: https://github.com/apache/datafusion/pull/14781#discussion_r2010529772
##########
datafusion/sql/src/unparser/plan.rs:
##########
@@ -860,8 +877,12 @@ impl Unparser<'_> {
query: &mut Option<QueryBuilder>,
select: &mut SelectBuilder,
relation: &mut RelationBuilder,
+ alias: &str,
) -> Result<()> {
let mut unnest_relation = UnnestRelationBuilder::default();
+
+ unnest_relation.alias(Some(self.new_table_alias(alias.to_string(),
vec![])));
+
Review Comment:
I think this is an edge case example
```sql
SELECT * from UNNEST([1,2,3]), UNNEST([1,2,3,4])
```
is transformed into
```sql
SELECT UNNEST(make_array(Int64(1),Int64(2),Int64(3))),
UNNEST(make_array(Int64(1),Int64(2),Int64(3),Int64(4))) FROM UNNEST([1, 2, 3])
AS unnset_table_1 (UNNEST(make_array(Int64(1),Int64(2),Int64(3)))) CROSS JOIN
UNNEST([1, 2, 3, 4]) AS unnset_table_1
(UNNEST(make_array(Int64(1),Int64(2),Int64(3),Int64(4))))
```
--
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]