jayzhan211 commented on code in PR #9355: URL: https://github.com/apache/arrow-datafusion/pull/9355#discussion_r1505845614
########## datafusion/sqllogictest/test_files/unnest.slt: ########## @@ -121,5 +183,49 @@ select unnest(array_remove(column1, 12)) from unnest_table; 5 6 + +## Unnest in from clause with alias +query I +select * from unnest([1,2]) as t; +---- +1 +2 + +query I +select a from unnest([1,2]) as t(a); +---- +1 +2 + + +## Unnest in from clause with offset is not supported +query error DataFusion error: This feature is not implemented: UNNEST table factor with offset is not supported yet +select * from unnest([1,2]) with offset; + +query error DataFusion error: This feature is not implemented: UNNEST table factor with offset is not supported yet +select * from unnest([1,2]) with offset offset_alias; + + +## More complex cases +query I +select * from unnest([1,2,(select sum(column3) from unnest_table)]); +---- +1 +2 +6 + +query II??I rowsort +select * from unnest([1]), unnest([2, 3]), unnest_table; Review Comment: I know some queries are non-deterministic and the result may be different per run. The unnest example here is quite different than the previous one that we get the same result every time. I think the ordering is well-defined here (but I did not search any document about how postgres and duckdb work), why do you think the ordering is due to the multiple partitions -- 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]
