Skip to content

Commit

Permalink
fixup! initial impl
Browse files Browse the repository at this point in the history
  • Loading branch information
scsmithr committed Dec 16, 2024
1 parent df00e2a commit dd9913b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl FunctionInfo for Unnest {

impl TableFunction for Unnest {
fn planner(&self) -> TableFunctionPlanner {
unimplemented!()
TableFunctionPlanner::InOut(self)
}
}

Expand Down
30 changes: 29 additions & 1 deletion slt/standard/functions/table/unnest_list.slt
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# UNNEST as a table function operating on lists.

query TT
DESCRIBE SELECT * FROM unnest([3,4,5]) ORDER BY 1;
----
unnest Int32

query I
SELECT * FROM unnest([3,4,5]);
SELECT * FROM unnest([3,4,5]) ORDER BY 1;
----
3
4
5

query TT
DESCRIBE SELECT * FROM unnest(NULL);
----
unnest Null

query ?
SELECT * FROM unnest(NULL);
----
NULL

query ?
SELECT * FROM unnest([]);
----

# Lateral

query ?I
SELECT * FROM (VALUES ([1,2,3]), ([8,9])) v(a), unnest(v.a) ORDER BY 2;
----

0 comments on commit dd9913b

Please sign in to comment.