Skip to content

Commit

Permalink
add testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangzhx committed Jun 9, 2023
1 parent 5228bb3 commit 12f45b1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions datafusion/core/tests/sqllogictests/test_files/functions.slt
Original file line number Diff line number Diff line change
Expand Up @@ -458,3 +458,25 @@ SELECT v1, v2, ROWNUMBER() OVER(ORDER BY v1) from test;

statement ok
drop table test

# Scalar function struct
statement ok
create table simple_struct_test (
c1 boolean,
c2 INT,
c3 FLOAT,
c4 DOUBLE,
a VARCHAR,
b TEXT
) as select *
from (values
(true, 1,3.1,3.14,'str','text')
);

query ?
SELECT struct(c1,c2,c3,c4,a,b) from simple_struct_test
----
{c0: 1, c1: 1, c2: 3.1, c3: 3.14, c4: str, c5: text}

statement ok
drop table simple_struct_test

0 comments on commit 12f45b1

Please sign in to comment.