Unverified 提交 10ba7102 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov 提交者: GitHub

Merge pull request #941 from katzyn/tests

Use >> syntax in median.sql and move out more tests from testScript.sql
...@@ -14,30 +14,22 @@ insert into test values (20), (20), (10); ...@@ -14,30 +14,22 @@ insert into test values (20), (20), (10);
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 15
> ------------------
> 15
insert into test values (10); insert into test values (10);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 15
> ---------
> 15
drop table test; drop table test;
> ok > ok
...@@ -53,30 +45,22 @@ insert into test values (20), (20), (10); ...@@ -53,30 +45,22 @@ insert into test values (20), (20), (10);
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 15
> ------------------
> 15
insert into test values (10); insert into test values (10);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 15
> ---------
> 15
drop table test; drop table test;
> ok > ok
...@@ -92,30 +76,22 @@ insert into test values (20), (20), (10); ...@@ -92,30 +76,22 @@ insert into test values (20), (20), (10);
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 15
> ------------------
> 15
insert into test values (10); insert into test values (10);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 15
> ---------
> 15
drop table test; drop table test;
> ok > ok
...@@ -131,30 +107,22 @@ insert into test values (20), (20), (10); ...@@ -131,30 +107,22 @@ insert into test values (20), (20), (10);
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 15
> ------------------
> 15
insert into test values (10); insert into test values (10);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 15
> ---------
> 15
drop table test; drop table test;
> ok > ok
...@@ -170,30 +138,22 @@ insert into test values (20), (20), (10); ...@@ -170,30 +138,22 @@ insert into test values (20), (20), (10);
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 15
> ------------------
> 15
insert into test values (10); insert into test values (10);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 15
> ---------
> 15
drop table test; drop table test;
> ok > ok
...@@ -209,30 +169,22 @@ insert into test values (20), (20), (10); ...@@ -209,30 +169,22 @@ insert into test values (20), (20), (10);
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 15
> ------------------
> 15
insert into test values (10); insert into test values (10);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 15
> ---------
> 15
drop table test; drop table test;
> ok > ok
...@@ -244,30 +196,22 @@ insert into test values (20), (20), (10); ...@@ -244,30 +196,22 @@ insert into test values (20), (20), (10);
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 15
> ------------------
> 15
insert into test values (10); insert into test values (10);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 15
> ---------
> 15
drop table test; drop table test;
> ok > ok
...@@ -279,30 +223,22 @@ insert into test values (20), (20), (10); ...@@ -279,30 +223,22 @@ insert into test values (20), (20), (10);
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 15
> ------------------
> 15
insert into test values (10); insert into test values (10);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 15
> ---------
> 15
drop table test; drop table test;
> ok > ok
...@@ -314,30 +250,22 @@ insert into test values (20), (20), (10); ...@@ -314,30 +250,22 @@ insert into test values (20), (20), (10);
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 15
> ------------------
> 15
insert into test values (10); insert into test values (10);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 15
> ---------
> 15
drop table test; drop table test;
> ok > ok
...@@ -349,30 +277,22 @@ insert into test values (20), (20), (10); ...@@ -349,30 +277,22 @@ insert into test values (20), (20), (10);
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 15
> ------------------
> 15
insert into test values (10); insert into test values (10);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 15
> ---------
> 15
drop table test; drop table test;
> ok > ok
...@@ -384,30 +304,22 @@ insert into test values (2), (2), (1); ...@@ -384,30 +304,22 @@ insert into test values (2), (2), (1);
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2.0
> ---------
> 2.0
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2.0
> ---------
> 2.0
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 1.5
> ------------------
> 1.5
insert into test values (1); insert into test values (1);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 1.5
> ---------
> 1.5
drop table test; drop table test;
> ok > ok
...@@ -419,30 +331,22 @@ insert into test values (2), (2), (1); ...@@ -419,30 +331,22 @@ insert into test values (2), (2), (1);
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2.0
> ---------
> 2.0
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2.0
> ---------
> 2.0
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 1.5
> ------------------
> 1.5
insert into test values (1); insert into test values (1);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 1.5
> ---------
> 1.5
drop table test; drop table test;
> ok > ok
...@@ -454,30 +358,22 @@ insert into test values (2), (2), (1); ...@@ -454,30 +358,22 @@ insert into test values (2), (2), (1);
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2
> ---------
> 2
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2
> ---------
> 2
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 1.5
> ------------------
> 1.5
insert into test values (1); insert into test values (1);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 1.5
> ---------
> 1.5
drop table test; drop table test;
> ok > ok
...@@ -489,30 +385,22 @@ insert into test values ('20:00:00'), ('20:00:00'), ('10:00:00'); ...@@ -489,30 +385,22 @@ insert into test values ('20:00:00'), ('20:00:00'), ('10:00:00');
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20:00:00
> ---------
> 20:00:00
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20:00:00
> ---------
> 20:00:00
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 15:00:00
> ------------------
> 15:00:00
insert into test values ('10:00:00'); insert into test values ('10:00:00');
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 15:00:00
> ---------
> 15:00:00
drop table test; drop table test;
> ok > ok
...@@ -524,30 +412,22 @@ insert into test values ('2000-01-20'), ('2000-01-20'), ('2000-01-10'); ...@@ -524,30 +412,22 @@ insert into test values ('2000-01-20'), ('2000-01-20'), ('2000-01-10');
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2000-01-20
> ----------
> 2000-01-20
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2000-01-20
> ----------
> 2000-01-20
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 2000-01-15
> ------------------
> 2000-01-15
insert into test values ('2000-01-10'); insert into test values ('2000-01-10');
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2000-01-15
> ----------
> 2000-01-15
drop table test; drop table test;
> ok > ok
...@@ -559,30 +439,22 @@ insert into test values ('2000-01-20 20:00:00'), ('2000-01-20 20:00:00'), ('2000 ...@@ -559,30 +439,22 @@ insert into test values ('2000-01-20 20:00:00'), ('2000-01-20 20:00:00'), ('2000
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2000-01-20 20:00:00
> -------------------
> 2000-01-20 20:00:00
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2000-01-20 20:00:00
> -------------------
> 2000-01-20 20:00:00
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 2000-01-15 15:00:00
> -------------------
> 2000-01-15 15:00:00
insert into test values ('2000-01-10 10:00:00'); insert into test values ('2000-01-10 10:00:00');
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2000-01-15 15:00:00
> -------------------
> 2000-01-15 15:00:00
delete from test; delete from test;
> update count: 5 > update count: 5
...@@ -591,9 +463,7 @@ insert into test values ('2000-01-20 20:00:00'), ('2000-01-21 20:00:00'); ...@@ -591,9 +463,7 @@ insert into test values ('2000-01-20 20:00:00'), ('2000-01-21 20:00:00');
> update count: 2 > update count: 2
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2000-01-21 08:00:00
> -------------------
> 2000-01-21 08:00:00
drop table test; drop table test;
> ok > ok
...@@ -605,30 +475,22 @@ insert into test values ('2000-01-20 20:00:00+04'), ('2000-01-20 20:00:00+04'), ...@@ -605,30 +475,22 @@ insert into test values ('2000-01-20 20:00:00+04'), ('2000-01-20 20:00:00+04'),
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2000-01-20 20:00:00+04
> ----------------------
> 2000-01-20 20:00:00+04
insert into test values (null); insert into test values (null);
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2000-01-20 20:00:00+04
> ----------------------
> 2000-01-20 20:00:00+04
select median(distinct v) from test; select median(distinct v) from test;
> MEDIAN(DISTINCT V) >> 2000-01-15 15:00:00+03
> ----------------------
> 2000-01-15 15:00:00+03
insert into test values ('2000-01-10 10:00:00+02'); insert into test values ('2000-01-10 10:00:00+02');
> update count: 1 > update count: 1
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2000-01-15 15:00:00+03
> ----------------------
> 2000-01-15 15:00:00+03
delete from test; delete from test;
> update count: 5 > update count: 5
...@@ -637,9 +499,7 @@ insert into test values ('2000-01-20 20:00:00+10:15'), ('2000-01-21 20:00:00-09' ...@@ -637,9 +499,7 @@ insert into test values ('2000-01-20 20:00:00+10:15'), ('2000-01-21 20:00:00-09'
> update count: 2 > update count: 2
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 2000-01-21 08:00:30+00:37
> -------------------------
> 2000-01-21 08:00:30+00:37
drop table test; drop table test;
> ok > ok
...@@ -671,17 +531,13 @@ insert into test values (20), (20), (10); ...@@ -671,17 +531,13 @@ insert into test values (20), (20), (10);
> update count: 3 > update count: 3
select median(v) from test where v <> 20; select median(v) from test where v <> 20;
> MEDIAN(V) >> 10
> ---------
> 10
create index test_idx on test(v asc); create index test_idx on test(v asc);
> ok > ok
select median(v) from test where v <> 20; select median(v) from test where v <> 20;
> MEDIAN(V) >> 10
> ---------
> 10
drop table test; drop table test;
> ok > ok
...@@ -697,9 +553,7 @@ insert into test values (20, 1), (10, 2), (20, 3); ...@@ -697,9 +553,7 @@ insert into test values (20, 1), (10, 2), (20, 3);
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
drop table test; drop table test;
> ok > ok
...@@ -712,25 +566,19 @@ create index test_idx on test(v desc); ...@@ -712,25 +566,19 @@ create index test_idx on test(v desc);
> ok > ok
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> null
> ---------
> null
insert into test values (10), (20); insert into test values (10), (20);
> update count: 2 > update count: 2
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 15
> ---------
> 15
insert into test values (20), (10), (20); insert into test values (20), (10), (20);
> update count: 3 > update count: 3
select median(v) from test; select median(v) from test;
> MEDIAN(V) >> 20
> ---------
> 20
drop table test; drop table test;
> ok > ok
......
...@@ -24,3 +24,9 @@ select abs(null) vn, abs(-1) r1, abs(1) r2, abs(0) r3, abs(-0.1) r4, abs(0.1) r5 ...@@ -24,3 +24,9 @@ select abs(null) vn, abs(-1) r1, abs(1) r2, abs(0) r3, abs(-0.1) r4, abs(0.1) r5
> null 1 1 0 0.1 0.1 > null 1 1 0 0.1 0.1
> rows: 1 > rows: 1
select * from table(id int=(1, 2), name varchar=('Hello', 'World')) x order by id;
> ID NAME
> -- -----
> 1 Hello
> 2 World
> rows (ordered): 2
...@@ -87,3 +87,15 @@ select cast(cast(95605327.73 as float) as decimal); ...@@ -87,3 +87,15 @@ select cast(cast(95605327.73 as float) as decimal);
select cast(cast('01020304-0506-0708-090a-0b0c0d0e0f00' as uuid) as binary); select cast(cast('01020304-0506-0708-090a-0b0c0d0e0f00' as uuid) as binary);
>> 0102030405060708090a0b0c0d0e0f00 >> 0102030405060708090a0b0c0d0e0f00
call cast('null' as uuid);
> exception
select cast('12345678123456781234567812345678' as uuid);
>> 12345678-1234-5678-1234-567812345678
select cast('000102030405060708090a0b0c0d0e0f' as uuid);
>> 00010203-0405-0607-0809-0a0b0c0d0e0f
select -cast(0 as double);
>> 0.0
...@@ -26,3 +26,6 @@ select decode('3', 2.0, 2.0, 3, 3.0); ...@@ -26,3 +26,6 @@ select decode('3', 2.0, 2.0, 3, 3.0);
select decode(4.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 9.0); select decode(4.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 9.0);
>> 4.0 >> 4.0
select decode(1, 1, '1', 1, '11') from dual;
>> 1
...@@ -2,3 +2,44 @@ ...@@ -2,3 +2,44 @@
-- and the EPL 1.0 (http://h2database.com/html/license.html). -- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group -- Initial Developer: H2 Group
-- --
select * from table(a int=(1)), table(b int=(2));
> A B
> - -
> 1 2
> rows: 1
create table test as select * from table(id int=(1, 2, 3));
> ok
SELECT * FROM (SELECT * FROM TEST) ORDER BY id;
> ID
> --
> 1
> 2
> 3
> rows (ordered): 3
SELECT * FROM (SELECT * FROM TEST) x ORDER BY id;
> ID
> --
> 1
> 2
> 3
> rows (ordered): 3
drop table test;
> ok
explain select * from table(id int = (1, 2), name varchar=('Hello', 'World'));
> PLAN
> -----------------------------------------------------------------------------------------------------
> SELECT TABLE.ID, TABLE.NAME FROM TABLE(ID INT=(1, 2), NAME VARCHAR=('Hello', 'World')) /* function */
> rows: 1
select * from table(id int=(1, 2), name varchar=('Hello', 'World')) x order by id;
> ID NAME
> -- -----
> 1 Hello
> 2 World
> rows (ordered): 2
...@@ -15,18 +15,6 @@ select * from test where id in (select id from test order by 'x'); ...@@ -15,18 +15,6 @@ select * from test where id in (select id from test order by 'x');
drop table test; drop table test;
> ok > ok
select abs(cast(0.0 as double)) x;
> X
> ---
> 0.0
> rows: 1
select * from table(a int=(1)), table(b int=(2));
> A B
> - -
> 1 2
> rows: 1
select x, x in(2, 3) i from system_range(1, 2) group by x; select x, x in(2, 3) i from system_range(1, 2) group by x;
> X I > X I
> - ----- > - -----
...@@ -144,12 +132,6 @@ select case seq.nextval when 2 then 'two' when 3 then 'three' when 1 then 'one' ...@@ -144,12 +132,6 @@ select case seq.nextval when 2 then 'two' when 3 then 'three' when 1 then 'one'
drop sequence seq; drop sequence seq;
> ok > ok
select decode(1, 1, '1', 1, '11') r from dual;
> R
> -
> 1
> rows: 1
create table test(x int); create table test(x int);
> ok > ok
...@@ -236,9 +218,6 @@ update test set pid = 1 where id = 2; ...@@ -236,9 +218,6 @@ update test set pid = 1 where id = 2;
drop table test; drop table test;
> ok > ok
call cast('null' as uuid);
> exception
create table test(name varchar(255)); create table test(name varchar(255));
> ok > ok
...@@ -420,12 +399,6 @@ explain select -cast(0 as real), -cast(0 as double); ...@@ -420,12 +399,6 @@ explain select -cast(0 as real), -cast(0 as double);
> SELECT 0.0, 0.0 FROM SYSTEM_RANGE(1, 1) /* PUBLIC.RANGE_INDEX */ > SELECT 0.0, 0.0 FROM SYSTEM_RANGE(1, 1) /* PUBLIC.RANGE_INDEX */
> rows: 1 > rows: 1
select -cast(0 as double) nz;
> NZ
> ---
> 0.0
> rows: 1
select () empty; select () empty;
> EMPTY > EMPTY
> ----- > -----
...@@ -1400,28 +1373,6 @@ DROP ROLE Y; ...@@ -1400,28 +1373,6 @@ DROP ROLE Y;
DROP ROLE X; DROP ROLE X;
> ok > ok
create table test as select * from table(id int=(1, 2, 3));
> ok
SELECT * FROM (SELECT * FROM TEST) ORDER BY id;
> ID
> --
> 1
> 2
> 3
> rows (ordered): 3
SELECT * FROM (SELECT * FROM TEST) x ORDER BY id;
> ID
> --
> 1
> 2
> 3
> rows (ordered): 3
drop table test;
> ok
select top sum(1) 0 from dual; select top sum(1) 0 from dual;
> exception > exception
...@@ -2064,12 +2015,6 @@ select * from V, C where V.V = C.C; ...@@ -2064,12 +2015,6 @@ select * from V, C where V.V = C.C;
drop table A, B, C, V cascade; drop table A, B, C, V cascade;
> ok > ok
explain select * from table(id int = (1, 2), name varchar=('Hello', 'World'));
> PLAN
> -----------------------------------------------------------------------------------------------------
> SELECT TABLE.ID, TABLE.NAME FROM TABLE(ID INT=(1, 2), NAME VARCHAR=('Hello', 'World')) /* function */
> rows: 1
CREATE TABLE TEST(ID INT PRIMARY KEY, FLAG BOOLEAN, NAME VARCHAR); CREATE TABLE TEST(ID INT PRIMARY KEY, FLAG BOOLEAN, NAME VARCHAR);
> ok > ok
...@@ -2275,13 +2220,6 @@ select (1, 2); ...@@ -2275,13 +2220,6 @@ select (1, 2);
> (1, 2) > (1, 2)
> rows: 1 > rows: 1
select * from table(id int=(1, 2), name varchar=('Hello', 'World')) x order by id;
> ID NAME
> -- -----
> 1 Hello
> 2 World
> rows (ordered): 2
create table array_test(x array); create table array_test(x array);
> ok > ok
...@@ -2790,18 +2728,6 @@ drop view address_view; ...@@ -2790,18 +2728,6 @@ drop view address_view;
drop table address; drop table address;
> ok > ok
select cast('12345678123456781234567812345678' as uuid);
> '12345678-1234-5678-1234-567812345678'
> --------------------------------------
> 12345678-1234-5678-1234-567812345678
> rows: 1
select cast('000102030405060708090a0b0c0d0e0f' as uuid);
> '00010203-0405-0607-0809-0a0b0c0d0e0f'
> --------------------------------------
> 00010203-0405-0607-0809-0a0b0c0d0e0f
> rows: 1
CREATE ALIAS PARSE_INT2 FOR "java.lang.Integer.parseInt(java.lang.String, int)"; CREATE ALIAS PARSE_INT2 FOR "java.lang.Integer.parseInt(java.lang.String, int)";
> ok > ok
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论