ustore存储引擎的regression用例11

This commit is contained in:
zhaosen
2024-05-10 11:43:44 +08:00
committed by yaoxin
parent 607ee01a75
commit 49233bbf4a
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,37 @@
--
-- check for over-optimization of whole-row Var referencing an Append plan
--
create table int4_test(f1 int4) with (storage_type = ustore);
select (select q from (select 1,2,3 where f1>0 union all select 4,5,6 where f1<=0) q) from int4_test;
q
---
(0 rows)
select (select q from (select 1,2,3 where f1>0 union all select 4,5,6.0 where f1<=0) q) from int4_test;
q
---
(0 rows)
insert into int4_test(f1) values(' 0 ');
insert into int4_test(f1) values('123456 ');
select * from int4_test;
f1
--------
0
123456
(2 rows)
select (select q from (select 1,2,3 where f1>0 union all select 4,5,6 where f1<=0) q) from int4_test;
q
---------
(4,5,6)
(1,2,3)
(2 rows)
select (select q from (select 1,2,3 where f1>0 union all select 4,5,6.0 where f1<=0) q) from int4_test;
q
-----------
(4,5,6.0)
(1,2,3)
(2 rows)

View File

@ -0,0 +1,11 @@
--
-- check for over-optimization of whole-row Var referencing an Append plan
--
create table int4_test(f1 int4) with (storage_type = ustore);
select (select q from (select 1,2,3 where f1>0 union all select 4,5,6 where f1<=0) q) from int4_test;
select (select q from (select 1,2,3 where f1>0 union all select 4,5,6.0 where f1<=0) q) from int4_test;
insert into int4_test(f1) values(' 0 ');
insert into int4_test(f1) values('123456 ');
select * from int4_test;
select (select q from (select 1,2,3 where f1>0 union all select 4,5,6 where f1<=0) q) from int4_test;
select (select q from (select 1,2,3 where f1>0 union all select 4,5,6.0 where f1<=0) q) from int4_test;