fix unrecognized node type 355 for outer join

This commit is contained in:
liang_-123
2020-12-30 17:08:10 +08:00
committed by zhaowenhao
parent 91b36a7c5a
commit 22251c5e31
3 changed files with 23 additions and 0 deletions

View File

@ -2759,6 +2759,7 @@ bool raw_expression_tree_walker(Node* node, bool (*walker)(), void* context)
case T_ParamRef:
case T_A_Const:
case T_A_Star:
case T_Rownum:
/* primitive node types with no subnodes */
break;
case T_Alias:

View File

@ -3763,3 +3763,16 @@ select * from hash_right_anti_y where not exists (select hash_right_anti_x.y fro
drop table hash_right_anti_x;
drop table hash_right_anti_y;
-- test rownum in outer join
create table t_a (id int, name varchar(10), code int);
create table t_b (id int, name varchar(10), code int);
insert into t_a values (1, 'tom', 3);
insert into t_b values (1, 'bat', 6);
select * from t_a a, t_b b where a.id(+) = b.id and rownum = 1;
id | name | code | id | name | code
----+------+------+----+------+------
1 | tom | 3 | 1 | bat | 6
(1 row)
drop table t_a;
drop table t_b;

View File

@ -1208,3 +1208,12 @@ select * from hash_right_anti_y where not exists (select hash_right_anti_x.y fro
drop table hash_right_anti_x;
drop table hash_right_anti_y;
-- test rownum in outer join
create table t_a (id int, name varchar(10), code int);
create table t_b (id int, name varchar(10), code int);
insert into t_a values (1, 'tom', 3);
insert into t_b values (1, 'bat', 6);
select * from t_a a, t_b b where a.id(+) = b.id and rownum = 1;
drop table t_a;
drop table t_b;