statement ok
create table t(id_0 int primary key, id_1 int primary key, v1 bigint null, v2 varchar null, v3 decimal null)

statement ok
insert into t values (0,0,1,10,100)

statement ok
insert into t values (1,1,1,10,100), (2,2,2,20,200), (3,3,3,30,300), (4,4,4,40,400)

statement ok
insert into t(id_0, id_1, v1, v2, v3) values (5,5,1,10,100)

statement ok
insert into t(id_0, id_1, v1, v2) values (6,6,1,10)

statement ok
insert into t(id_0, id_1, v2, v1) values (7,7,1,10)

statement error
insert into t(id_0, id_1, v1, v2, v3) values (0, 0)

statement error
insert into t(id_0, id_1, v1, v2, v3) values (0, 0, 0)

statement error
insert into t(id_0, id_1, v1, v2, v3) values (0, 0, 0, 0)

statement ok
insert into t values (8,8,NULL,NULL,NULL)

statement ok
insert overwrite t values (1, 1, 9, 9, 9)

query IIII rowsort
select * from t
----
0 0 1 10 100
1 1 9 9 9
2 2 2 20 200
3 3 3 30 300
4 4 4 40 400
5 5 1 10 100
6 6 1 10 null
7 7 10 1 null
8 8 null null null

statement ok
drop table t;

statement ok
create table t1(id_0 int primary key, id_1 int primary key, v1 bigint default 233)

statement ok
insert into t1 values (0, 0)

statement ok
insert into t1 values (1, 1)

statement ok
insert into t1 values (2, 2)

statement ok
insert into t1 values (3, 3, DEFAULT)

statement ok
insert into t1 values (4, 4, 0)

statement ok
insert into t1 (v1, id_0, id_1) values (DEFAULT, 5, 5)

query III rowsort
select * from t1
----
0 0 233
1 1 233
2 2 233
3 3 233
4 4 0
5 5 233

statement ok
drop table t1;

statement ok
create table t2(id_0 int primary key, id_1 int primary key, v1 char(10), v2 varchar);

statement ok
insert into t2 (id_0, id_1, v1, v2) values (0, 0, 'foo', 'foo');

query ITT
select * from t2;
----
0 0 foo foo

query B
select v1 = v2 from t2;
----
true

statement ok
drop table t2;
