This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 6d61503b42 clean up the todo comments in unnest.slt (#12795)
6d61503b42 is described below
commit 6d61503b42636238961b677f720ef3e9fdd32491
Author: Jax Liu <[email protected]>
AuthorDate: Wed Oct 9 02:03:17 2024 +0800
clean up the todo comments in unnest.slt (#12795)
---
datafusion/sqllogictest/test_files/unnest.slt | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/datafusion/sqllogictest/test_files/unnest.slt
b/datafusion/sqllogictest/test_files/unnest.slt
index 9e79805d52..b923e94fc8 100644
--- a/datafusion/sqllogictest/test_files/unnest.slt
+++ b/datafusion/sqllogictest/test_files/unnest.slt
@@ -511,10 +511,19 @@ x y [30, 40, 50]
query error DataFusion error: type_coercion\ncaused by\nThis feature is not
implemented: Unnest should be rewritten to LogicalPlan::Unnest before type
coercion
select sum(unnest(generate_series(1,10)));
-## TODO: support unnest as a child expr
query error DataFusion error: Internal error: unnest on struct can only be
applied at the root level of select expression
select arrow_typeof(unnest(column5)) from unnest_table;
+query T
+select arrow_typeof(unnest(column1)) from unnest_table;
+----
+Int64
+Int64
+Int64
+Int64
+Int64
+Int64
+Int64
## unnest from a result of a logical plan with limit and offset
query I
@@ -524,10 +533,19 @@ select unnest(column1) from (select * from
(values([1,2,3]), ([4,5,6])) limit 1
5
6
-## FIXME: https://github.com/apache/datafusion/issues/11198
query error DataFusion error: Error during planning: Projections require
unique expression names but the expression "UNNEST\(unnest_table.column1\)" at
position 0 and "UNNEST\(unnest_table.column1\)" at position 1 have the same
name. Consider aliasing \("AS"\) one of them.
select unnest(column1), unnest(column1) from unnest_table;
+query II
+select unnest(column1), unnest(column1) u1 from unnest_table;
+----
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+12 12
## the same unnest expr is referened multiple times (unnest is the bottom-most
expr)
query ??II
@@ -777,10 +795,13 @@ select unnest(unnest(column2)) c2, count(column3) from
recursive_unnest_table gr
[, 6] 1
NULL 1
-### TODO: group by unnest struct
query error DataFusion error: Error during planning: Projection references
non\-aggregate values
select unnest(column1) c1 from nested_unnest_table group by c1.c0;
+# TODO: this query should work. see issue:
https://github.com/apache/datafusion/issues/12794
+query error DataFusion error: Internal error: unnest on struct can only be
applied at the root level of select expression
+select unnest(column1) c1 from nested_unnest_table
+
query II??I??
select unnest(column5), * from unnest_table;
----
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]