jonahgao commented on code in PR #9355: URL: https://github.com/apache/arrow-datafusion/pull/9355#discussion_r1505537391
########## 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 think the order will not affect correctness if it isn't explicitly specified, due to the parallel execution across multiple partitions, various execution strategies, and so on. What do you think? -- 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]
