Skip to content

Commit

Permalink
test: move new attach tests to right folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Mause committed Aug 1, 2023
1 parent 2764e3d commit 5452dce
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 24 deletions.
24 changes: 0 additions & 24 deletions test/sql/scanner/mixed_numeric.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,6 @@ select * from sqlite_scan('data/db/mixed_data_numeric.db', 'tbl');
----
Invalid type in column "a": expected float or integer, found "hello" of type "text" instead.

# using the all_varchar option, without the setting
statement ok
ATTACH 'data/mixed_data_numeric.db' as mydb (TYPE sqlite, all_varchar TRUE);

query I
select * from mydb.tbl;
----
42
hello
NULL

statement ok
DETACH mydb;

statement ok
SET sqlite_all_varchar=true

Expand All @@ -35,13 +21,3 @@ select * from sqlite_scan('data/db/mixed_data_numeric.db', 'tbl');
hello
NULL

# using the setting, not the all_varchar option
statement ok
ATTACH 'data/db/mixed_data_numeric.db' as mydb (TYPE sqlite);

query I
select * from mydb.tbl;
----
42
hello
NULL
31 changes: 31 additions & 0 deletions test/sql/storage/attach_mixed_numeric.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
require sqlite_scanner

# load from a database with a numeric column that has mixed types

# using the all_varchar option, without the setting
statement ok
ATTACH 'data/mixed_data_numeric.db' as mydb (TYPE sqlite, all_varchar TRUE);

query I
select * from mydb.tbl;
----
42
hello
NULL

statement ok
DETACH mydb;

statement ok
SET sqlite_all_varchar=true

# using the setting, not the all_varchar option
statement ok
ATTACH 'data/mixed_data_numeric.db' as mydb (TYPE sqlite);

query I
select * from mydb.tbl;
----
42
hello
NULL

0 comments on commit 5452dce

Please sign in to comment.