!4443 修复创建base result plan的bug
Merge pull request !4443 from pengjiong/drop_ext
This commit is contained in:
@ -387,8 +387,11 @@ static Plan* create_plan_recurse(PlannerInfo* root, Path* best_path)
|
||||
Assert(IsA(best_path, ResultPath));
|
||||
plan = (Plan*)create_result_plan(root, (ResultPath*)best_path);
|
||||
}
|
||||
} else {
|
||||
} else if (IsA(best_path, ResultPath)) {
|
||||
plan = (Plan*)create_result_plan(root, (ResultPath*)best_path);
|
||||
} else {
|
||||
Assert(IsA(best_path, Path));
|
||||
plan = create_scan_plan(root, best_path);
|
||||
}
|
||||
break;
|
||||
case T_ProjectSet:
|
||||
|
||||
@ -321,6 +321,21 @@ explain (verbose, costs off) select * from t2 where t2.c1 in (select t1.c1 from
|
||||
|
||||
drop table if exists t1;
|
||||
drop table if exists t2;
|
||||
CREATE TABLE table1 ( column63 INT , column44 INT ) ;
|
||||
SELECT 1 FROM ( SELECT 1 FROM table1 WHERE NOT EXISTS ( SELECT 1 WHERE column63 = column44 ) ) AS alias1 ;
|
||||
?column?
|
||||
----------
|
||||
(0 rows)
|
||||
|
||||
insert into table1 values(2,3);
|
||||
insert into table1 values(4,4);
|
||||
SELECT 1 FROM ( SELECT 1 FROM table1 WHERE NOT EXISTS ( SELECT 1 WHERE column63 = column44 ) ) AS alias1 ;
|
||||
?column?
|
||||
----------
|
||||
1
|
||||
(1 row)
|
||||
|
||||
drop table table1;
|
||||
drop schema query_rewrite cascade;
|
||||
NOTICE: drop cascades to 7 other objects
|
||||
DETAIL: drop cascades to table t3
|
||||
|
||||
@ -187,5 +187,12 @@ explain (verbose, costs off) select * from t2 where t2.c1 in (select t1.c1 from
|
||||
drop table if exists t1;
|
||||
drop table if exists t2;
|
||||
|
||||
CREATE TABLE table1 ( column63 INT , column44 INT ) ;
|
||||
SELECT 1 FROM ( SELECT 1 FROM table1 WHERE NOT EXISTS ( SELECT 1 WHERE column63 = column44 ) ) AS alias1 ;
|
||||
insert into table1 values(2,3);
|
||||
insert into table1 values(4,4);
|
||||
SELECT 1 FROM ( SELECT 1 FROM table1 WHERE NOT EXISTS ( SELECT 1 WHERE column63 = column44 ) ) AS alias1 ;
|
||||
drop table table1;
|
||||
|
||||
drop schema query_rewrite cascade;
|
||||
reset current_schema;
|
||||
|
||||
Reference in New Issue
Block a user