jayzhan211 opened a new issue, #9394:
URL: https://github.com/apache/arrow-datafusion/issues/9394
The syntax is like `select * from unnest(), unnest(), table;`
```
postgres=# select * from unnest(ARRAY[1,2,3]), unnest(ARRAY[4,5]) as b2, t1;
unnest | b2 | a
--------+----+---------
1 | 4 | {1,2,3}
2 | 4 | {1,2,3}
3 | 4 | {1,2,3}
1 | 5 | {1,2,3}
2 | 5 | {1,2,3}
3 | 5 | {1,2,3}
1 | 4 | {4,5}
2 | 4 | {4,5}
3 | 4 | {4,5}
1 | 5 | {4,5}
2 | 5 | {4,5}
3 | 5 | {4,5}
(12 rows)
```
Similar for Duckdb, a is [1,2,3] and [10, 20]
```
D select * from unnest([1,2,3]), unnest([4,5]) as b2, t1;
┌──────────────────────────┬───────────────────────┬───────────┐
│ main.list_value(1, 2, 3) │ main.list_value(4, 5) │ a │
│ int32 │ int32 │ int32[] │
├──────────────────────────┼───────────────────────┼───────────┤
│ 1 │ 4 │ [1, 2, 3] │
│ 2 │ 4 │ [1, 2, 3] │
│ 3 │ 4 │ [1, 2, 3] │
│ 1 │ 5 │ [1, 2, 3] │
│ 2 │ 5 │ [1, 2, 3] │
│ 3 │ 5 │ [1, 2, 3] │
│ 1 │ 4 │ [10, 20] │
│ 2 │ 4 │ [10, 20] │
│ 3 │ 4 │ [10, 20] │
│ 1 │ 5 │ [10, 20] │
│ 2 │ 5 │ [10, 20] │
│ 3 │ 5 │ [10, 20] │
├──────────────────────────┴───────────────────────┴───────────┤
│ 12 rows 3 columns │
└──────────────────────────────────────────────────────────────┘
```
In datafusion, we have the similar result but the ordering is different. I
think we should understand the reason of the different ordering in cross join.
_Originally posted by @jayzhan211 in
https://github.com/apache/arrow-datafusion/pull/9355#discussion_r1505255606_
--
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]