gpdb icon indicating copy to clipboard operation
gpdb copied to clipboard

except all produce wrong result

Open wangpanCN opened this issue 1 year ago • 0 comments

Bug Report

create table t2(a int, b int, c int, d int) distributed by(a);
create table t3(i int, k int) distributed by(i);
create table t1(a int, b int, c int, d int, i int, k int);
insert into t2 values (1,10,100,1000),
  (2,20,200,2000),
  (3,30,300,3000),
  (4,40,400,4000),
  (null,null,500,5000),
  (6, 60, 600, 6000);
insert into t3 values
 (1,101),
  (2,102),
  (3,103),
  (4,104);
  insert into t1 select * from t2 left join t3 on a = i;
  
postgres=# select * from t1 except all(select * from t2 left join t3 on a=i);
 a | b  |  c  |  d   | i | k
---+----+-----+------+---+---
 6 | 60 | 600 | 6000 |   |
(1 row)

Greenplum version or build

both 7x and 6x

OS version and uname -a

autoconf options used ( config.status --config )

Installation information ( pg_config )

Expected behavior

the SELECT query return no results

Actual behavior

the SELECT query return one row

Step to reproduce the behavior

wangpanCN avatar Jan 18 '24 11:01 wangpanCN