query I
select 1
----
1

query R
select 10000.00::FLOAT + 234.567::FLOAT
----
10234.567

query R
select 100.0::DOUBLE/8.0::DOUBLE
----
12.5

query B
select 2>1
----
true

query B
select 3>4
----
false

query T
select DATE '2001-02-16'
----
2001-02-16

query T
select DATETIME '2001-02-16 01:02:03'
----
2001-02-16 01:02:03

query T
select TIME '01:02:03'
----
01:02:03

query T
select cast(DATETIME '2001-02-16 02:03:03' as TIME)
----
02:03:03

subtest NullType

statement ok
create table t(id int primary key,v1 int null)

statement ok
insert into t values(0, null)

query T
select * from t
----
0 null

statement ok
drop table t

subtest MultiRowsMultiColumn

statement ok
create table t(id int primary key, v1 int not null, v2 int not null, v3 int not null)

statement ok
insert into t values(0,1,4,2), (1,2,3,3), (2,3,4,4), (3,4,3,5)

query II rowsort
select v1,v3 from t where v2 > 3
----
1 2
3 4

statement ok
drop table t

subtest SyntaxError

statement error
SELECT * FORM dish

subtest CharArray

statement ok
create table t (id int primary key, name VARCHAR NOT NULL)

statement ok
insert into t values (0,'text1'), (1,'text2')

query T rowsort
select * from t
----
0 text1
1 text2

statement error
select CAST(name AS BIGINT) from t

statement ok
select CAST(id AS VARCHAR) from t

statement ok
create table t1 (id int primary key, name VARCHAR NOT NULL)

# issue: https://github.com/KipData/KiteSQL/issues/175
statement error
select t.name from t1;

statement ok
drop table t1

statement ok
drop table if exists t

statement ok
drop table if exists t

statement ok
create table t2 (c1 int primary key, c2 int, c3 int primary key)

statement ok
insert into t2 values(0, 0, 0), (1, 1, 1), (2, 2, 2);

query III
select c1 from t2;
----
0
1
2
