should be it

This commit is contained in:
2025-10-24 19:21:19 -05:00
parent a4b23fc57c
commit f09560c7b1
14047 changed files with 3161551 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
# name: test/sql/export/parquet/export_parquet_bit.test
# description: Test EXPORT DATABASE with BIT columns
# group: [parquet]
require parquet
statement ok
begin transaction;
statement ok
create table tbl as select "bit" from test_all_types(), range(3);
query I nosort result
select * from tbl;
----
# now export the db
statement ok
EXPORT DATABASE '__TEST_DIR__/export_test' (FORMAT PARQUET)
statement ok
ROLLBACK
statement ok
IMPORT DATABASE '__TEST_DIR__/export_test'
query I nosort result
select * from tbl;
----

View File

@@ -0,0 +1,50 @@
# name: test/sql/export/parquet/export_parquet_enum.test
# description: Test EXPORT DATABASE with UNION columns
# group: [parquet]
require parquet
statement ok
begin transaction;
statement ok
create type my_enum as enum ('1', '2', '3')
statement ok
create table tbl (a my_enum);
statement ok
create table tbl2 as select 'hello''world'::enum('hello''world');
statement ok
insert into tbl VALUES
('1'),
(NULL),
('3');
query I nosort result1
select * from tbl;
----
query I nosort result2
select * from tbl2;
----
# now export the db
statement ok
EXPORT DATABASE '__TEST_DIR__/export_test' (FORMAT PARQUET)
statement ok
ROLLBACK
statement ok
IMPORT DATABASE '__TEST_DIR__/export_test'
query I nosort result1
select * from tbl;
----
query I nosort result2
select * from tbl2;
----

View File

@@ -0,0 +1,29 @@
# name: test/sql/export/parquet/export_parquet_hugeint.test
# description: Test EXPORT DATABASE with BIT columns
# group: [parquet]
require parquet
statement ok
begin transaction;
statement ok
create table tbl as select "hugeint" from test_all_types(), range(3);
query I nosort result
select * from tbl;
----
# now export the db
statement ok
EXPORT DATABASE '__TEST_DIR__/export_test' (FORMAT PARQUET)
statement ok
ROLLBACK
statement ok
IMPORT DATABASE '__TEST_DIR__/export_test'
query I nosort result
select * from tbl;
----

View File

@@ -0,0 +1,31 @@
# name: test/sql/export/parquet/export_parquet_json.test
# description: Test EXPORT DATABASE with JSON columns
# group: [parquet]
require parquet
require json
statement ok
begin transaction;
statement ok
create table tbl as select val from ( select json_structure('{"a": 42}') val), range(3);
query I nosort result
select * from tbl;
----
# now export the db
statement ok
EXPORT DATABASE '__TEST_DIR__/export_test' (FORMAT PARQUET)
statement ok
ROLLBACK
statement ok
IMPORT DATABASE '__TEST_DIR__/export_test'
query I nosort result
select * from tbl;
----

View File

@@ -0,0 +1,31 @@
# name: test/sql/export/parquet/export_parquet_list.test
# description: Test EXPORT DATABASE with LIST columns
# group: [parquet]
require parquet
statement ok
begin transaction;
statement ok
create table tbl as select val from (
select ['01010101'::BIT, '01011101001'::BIT] val
), range(3);
query I nosort result
select * from tbl;
----
# now export the db
statement ok
EXPORT DATABASE '__TEST_DIR__/export_test' (FORMAT PARQUET)
statement ok
ROLLBACK
statement ok
IMPORT DATABASE '__TEST_DIR__/export_test'
query I nosort result
select * from tbl;
----

View File

@@ -0,0 +1,50 @@
# name: test/sql/export/parquet/export_parquet_map.test
# description: Test EXPORT DATABASE with MAP columns
# group: [parquet]
require parquet
statement ok
begin transaction;
statement ok
create table unsupported_key as select val from (
select MAP {
'hello': '01010101000'::BIT,
'HELLO': NULL::BIT
} val
), range(3);
statement ok
create table unsupported_value as select val from (
select MAP {
'01010101000'::BIT: 'hello',
'11110111101'::BIT: 'world'
} val
), range(3);
query I nosort key
select * from unsupported_key;
----
query I nosort value
select * from unsupported_value;
----
# now export the db
statement ok
EXPORT DATABASE '__TEST_DIR__/export_test' (FORMAT PARQUET)
statement ok
ROLLBACK
statement ok
IMPORT DATABASE '__TEST_DIR__/export_test'
query I nosort key
select * from unsupported_key;
----
query I nosort value
select * from unsupported_value;
----

View File

@@ -0,0 +1,35 @@
# name: test/sql/export/parquet/export_parquet_struct.test
# description: Test EXPORT DATABASE with MAP columns
# group: [parquet]
require parquet
statement ok
begin transaction;
statement ok
create table tbl as select val from (
select {
'a': '01010101000'::BIT,
'b': true,
'c': NULL
} val
), range(3);
query I nosort result
select * from tbl;
----
# now export the db
statement ok
EXPORT DATABASE '__TEST_DIR__/export_test' (FORMAT PARQUET)
statement ok
ROLLBACK
statement ok
IMPORT DATABASE '__TEST_DIR__/export_test'
query I nosort result
select * from tbl;
----

View File

@@ -0,0 +1,43 @@
# name: test/sql/export/parquet/export_parquet_union.test
# description: Test EXPORT DATABASE with UNION columns
# group: [parquet]
require parquet
statement ok
begin transaction;
statement ok
create table tbl as select "union" from test_all_types(), range(3);
statement ok
create table tbl2 (a UNION(a bit, b bool));
statement ok
insert into tbl2 VALUES ('00101010'::BIT), (True::BOOL), (NULL::BIT);
query I nosort result1
select * from tbl;
----
query I nosort result2
select * from tbl2;
----
# now export the db
statement ok
EXPORT DATABASE '__TEST_DIR__/export_test' (FORMAT PARQUET)
statement ok
ROLLBACK
statement ok
IMPORT DATABASE '__TEST_DIR__/export_test'
query I nosort result1
select * from tbl;
----
query I nosort result2
select * from tbl2;
----