Skip to content

Commit

Permalink
add test data and tests for excel table
Browse files Browse the repository at this point in the history
  • Loading branch information
talagluck committed Jul 31, 2024
1 parent c8189ae commit 2379def
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion testdata/sqllogictests/xlsx.slt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ select count(*) from './testdata/xlsx/userdata1.xlsx';
----
1000

query I
query Id
select count(*) from read_excel('./testdata/xlsx/userdata1.xlsx', has_header => true);
----
1000
Expand Down Expand Up @@ -156,3 +156,33 @@ select * from read_excel('./testdata/xlsx/multiple_sheets.xlsx', sheet_name => '
foo 4.0 4 4.0
5 5.0 5 5.0
bar (empty) (empty) (empty)

query
select * from read_excel('./testdata/xlsx/tables.xlsx', sheet_name => 'table_and_named_range', table_name => 'users', has_header => true);
----
1 alice [email protected]
2 bob [email protected]
3 chandra [email protected]

query
select * from read_excel('./testdata/xlsx/tables.xlsx', table_name => 'named_range', has_header => false);
----
id number string
10 60000 foo
20 78 bar

query
select * from read_excel('./testdata/xlsx/tables.xlsx', sheet_name => 'one_table', table_name => 'stuff');
----
red orange yellow
circle triangle square
cat dog mouse
pizza pasta burger

statement error
select * from read_excel('./testdata/xlsx/tables.xlsx', sheet_name => 'abc', table_name => 'stuff');
----
red orange yellow
circle triangle square
cat dog mouse
pizza pasta burger
Binary file added testdata/xlsx/tables.xlsx
Binary file not shown.

0 comments on commit 2379def

Please sign in to comment.