Skip to content

Commit 7222c9f

Browse files
committed
add testcase
1 parent 5228bb3 commit 7222c9f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

datafusion/core/tests/sqllogictests/test_files/functions.slt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,3 +458,26 @@ SELECT v1, v2, ROWNUMBER() OVER(ORDER BY v1) from test;
458458

459459
statement ok
460460
drop table test
461+
462+
statement ok
463+
create table simple_struct_test (
464+
c1 boolean,
465+
c2 INT,
466+
c3 FLOAT,
467+
c4 DOUBLE,
468+
c5 VARCHAR,
469+
) as select *
470+
from (values
471+
(true, 1,3.1,3.14,'str')
472+
);
473+
474+
# Scalar function struct
475+
query ?
476+
SELECT struct(c1,c2,c3,c4,c5) from simple_struct_test
477+
----
478+
{c0: 1, c1: 1, c2: 3.1, c3: 3.14, c4: str}
479+
480+
statement ok
481+
drop table simple_struct_test
482+
483+

0 commit comments

Comments
 (0)