提交 c5fcca01 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Use >> syntax in more tests

上级 67c45002
...@@ -201,37 +201,25 @@ CREATE VIEW V AS SELECT * FROM TEST; ...@@ -201,37 +201,25 @@ CREATE VIEW V AS SELECT * FROM TEST;
> ok > ok
SELECT * FROM V; SELECT * FROM V;
> E >> B
> -
> B
> rows: 1
CREATE VIEW V1 AS SELECT E + 2 AS E FROM TEST; CREATE VIEW V1 AS SELECT E + 2 AS E FROM TEST;
> ok > ok
SELECT * FROM V1; SELECT * FROM V1;
> E >> 3
> -
> 3
> rows: 1
CREATE VIEW V2 AS SELECT E + E AS E FROM TEST; CREATE VIEW V2 AS SELECT E + E AS E FROM TEST;
> ok > ok
SELECT * FROM V2; SELECT * FROM V2;
> E >> 2
> -
> 2
> rows: 1
CREATE VIEW V3 AS SELECT -E AS E FROM TEST; CREATE VIEW V3 AS SELECT -E AS E FROM TEST;
> ok > ok
SELECT * FROM V3; SELECT * FROM V3;
> E >> -1
> --
> -1
> rows: 1
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME = 'E' ORDER BY TABLE_NAME; SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME = 'E' ORDER BY TABLE_NAME;
> TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_PRECISION_RADIX NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME TYPE_NAME NULLABLE IS_COMPUTED SELECTIVITY CHECK_CONSTRAINT SEQUENCE_NAME REMARKS SOURCE_DATA_TYPE COLUMN_TYPE COLUMN_ON_UPDATE > TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_PRECISION_RADIX NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME TYPE_NAME NULLABLE IS_COMPUTED SELECTIVITY CHECK_CONSTRAINT SEQUENCE_NAME REMARKS SOURCE_DATA_TYPE COLUMN_TYPE COLUMN_ON_UPDATE
......
...@@ -50,10 +50,7 @@ INSERT INTO TEST VALUES (TIME '08:00:00'); ...@@ -50,10 +50,7 @@ INSERT INTO TEST VALUES (TIME '08:00:00');
> update count: 1 > update count: 1
SELECT TIME FROM TEST; SELECT TIME FROM TEST;
> TIME >> 08:00:00
> --------
> 08:00:00
> rows: 1
DROP TABLE TEST; DROP TABLE TEST;
> ok > ok
......
...@@ -14,10 +14,7 @@ select sum(n) from ( ...@@ -14,10 +14,7 @@ select sum(n) from (
) )
select n from r select n from r
); );
> SUM(N) >> 6
> ------
> 6
> rows: 1
select sum(n) from (select 0) join ( select sum(n) from (select 0) join (
with recursive r(n) as ( with recursive r(n) as (
...@@ -25,10 +22,7 @@ select sum(n) from (select 0) join ( ...@@ -25,10 +22,7 @@ select sum(n) from (select 0) join (
) )
select n from r select n from r
) on 1=1; ) on 1=1;
> SUM(N) >> 6
> ------
> 6
> rows: 1
select 0 from ( select 0 from (
select 0 where 0 in ( select 0 where 0 in (
......
...@@ -23,16 +23,10 @@ EXPLAIN PLAN FOR SELECT * FROM SYSTEM_RANGE(1, 20); ...@@ -23,16 +23,10 @@ EXPLAIN PLAN FOR SELECT * FROM SYSTEM_RANGE(1, 20);
select sum(x) from system_range(2, 1000) r where select sum(x) from system_range(2, 1000) r where
not exists(select * from system_range(2, 32) r2 where r.x>r2.x and mod(r.x, r2.x)=0); not exists(select * from system_range(2, 32) r2 where r.x>r2.x and mod(r.x, r2.x)=0);
> SUM(X) >> 76127
> ------
> 76127
> rows: 1
SELECT COUNT(*) FROM SYSTEM_RANGE(0, 2111222333); SELECT COUNT(*) FROM SYSTEM_RANGE(0, 2111222333);
> COUNT(*) >> 2111222334
> ----------
> 2111222334
> rows: 1
select * from system_range(2, 100) r where select * from system_range(2, 100) r where
not exists(select * from system_range(2, 11) r2 where r.x>r2.x and mod(r.x, r2.x)=0); not exists(select * from system_range(2, 11) r2 where r.x>r2.x and mod(r.x, r2.x)=0);
...@@ -136,19 +130,13 @@ SELECT COUNT(*) FROM SYSTEM_RANGE(10, 2, -2); ...@@ -136,19 +130,13 @@ SELECT COUNT(*) FROM SYSTEM_RANGE(10, 2, -2);
>> 5 >> 5
SELECT * FROM SYSTEM_RANGE(1, 1); SELECT * FROM SYSTEM_RANGE(1, 1);
> X >> 1
> -
> 1
> rows: 1
SELECT COUNT(*) FROM SYSTEM_RANGE(1, 1); SELECT COUNT(*) FROM SYSTEM_RANGE(1, 1);
>> 1 >> 1
SELECT * FROM SYSTEM_RANGE(1, 1, -1); SELECT * FROM SYSTEM_RANGE(1, 1, -1);
> X >> 1
> -
> 1
> rows: 1
SELECT COUNT(*) FROM SYSTEM_RANGE(1, 1, -1); SELECT COUNT(*) FROM SYSTEM_RANGE(1, 1, -1);
>> 1 >> 1
......
...@@ -7173,10 +7173,7 @@ CALL NEXT VALUE FOR TEST_LONG; ...@@ -7173,10 +7173,7 @@ CALL NEXT VALUE FOR TEST_LONG;
> rows: 1 > rows: 1
CALL IDENTITY(); CALL IDENTITY();
> IDENTITY() >> 90123456789012345
> -----------------
> 90123456789012345
> rows: 1
SELECT SEQUENCE_NAME, CURRENT_VALUE, INCREMENT FROM INFORMATION_SCHEMA.SEQUENCES; SELECT SEQUENCE_NAME, CURRENT_VALUE, INCREMENT FROM INFORMATION_SCHEMA.SEQUENCES;
> SEQUENCE_NAME CURRENT_VALUE INCREMENT > SEQUENCE_NAME CURRENT_VALUE INCREMENT
...@@ -7825,28 +7822,19 @@ insert into test(name) values('World'); ...@@ -7825,28 +7822,19 @@ insert into test(name) values('World');
> update count: 1 > update count: 1
call identity(); call identity();
> IDENTITY() >> 2
> ----------
> 2
> rows: 1
insert into test(id, name) values(1234567890123456, 'World'); insert into test(id, name) values(1234567890123456, 'World');
> update count: 1 > update count: 1
call identity(); call identity();
> IDENTITY() >> 1234567890123456
> ----------------
> 1234567890123456
> rows: 1
insert into test(name) values('World'); insert into test(name) values('World');
> update count: 1 > update count: 1
call identity(); call identity();
> IDENTITY() >> 1234567890123457
> ----------------
> 1234567890123457
> rows: 1
select * from test order by id; select * from test order by id;
> ID NAME > ID NAME
...@@ -7876,28 +7864,19 @@ insert into test(name) values('World'); ...@@ -7876,28 +7864,19 @@ insert into test(name) values('World');
> update count: 1 > update count: 1
call identity(); call identity();
> IDENTITY() >> 2
> ----------
> 2
> rows: 1
insert into test(id, name) values(1234567890123456, 'World'); insert into test(id, name) values(1234567890123456, 'World');
> update count: 1 > update count: 1
call identity(); call identity();
> IDENTITY() >> 1234567890123456
> ----------------
> 1234567890123456
> rows: 1
insert into test(name) values('World'); insert into test(name) values('World');
> update count: 1 > update count: 1
call identity(); call identity();
> IDENTITY() >> 1234567890123457
> ----------------
> 1234567890123457
> rows: 1
select * from test order by id; select * from test order by id;
> ID NAME > ID NAME
...@@ -7997,10 +7976,7 @@ insert into x(id) values(1); ...@@ -7997,10 +7976,7 @@ insert into x(id) values(1);
> update count: 1 > update count: 1
select b from x; select b from x;
> B >> a
> -
> a
> rows: 1
delete from x; delete from x;
> update count: 1 > update count: 1
...@@ -8030,10 +8006,7 @@ insert into x(id) values(1); ...@@ -8030,10 +8006,7 @@ insert into x(id) values(1);
> update count: 1 > update count: 1
select b from x; select b from x;
> B >> null
> ----
> null
> rows: 1
delete from x; delete from x;
> update count: 1 > update count: 1
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论