Skip to content

Commit 890d878

Browse files
committed
add basic unit tests for scalar function
1 parent 3a5a5bd commit 890d878

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

test/sql/parse_tools/scalar_functions/parse_table_names.test

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,9 @@ SELECT parse_table_names('select * from MyTable');
99
Catalog Error: Scalar Function with name parse_table_names does not exist!
1010

1111
# Require statement will ensure this test is run with this extension loaded
12-
require parser_tools
12+
require parser_tools
13+
14+
query I
15+
SELECT parse_table_names('select * from MyTable');
16+
----
17+
[MyTable]

test/sql/parse_tools/scalar_functions/parse_tables.test

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,9 @@ SELECT parse_tables('select 1');
99
Catalog Error: Scalar Function with name parse_tables does not exist!
1010

1111
# Require statement will ensure this test is run with this extension loaded
12-
require parser_tools
12+
require parser_tools
13+
14+
query I
15+
SELECT parse_tables('select * from MyTable');
16+
----
17+
[{'schema': main, 'table': MyTable, 'context': from}]

0 commit comments

Comments
 (0)