Paul Guo created HAWQ-1455:
------------------------------
Summary: Wrong results on CTAS query over catalog
Key: HAWQ-1455
URL: https://issues.apache.org/jira/browse/HAWQ-1455
Project: Apache HAWQ
Issue Type: Bug
Components: Core
Reporter: Paul Guo
Assignee: Ed Espino
The last ctas sql returns 0 tuple. This is wrong.
$ cat catalog.sql
create temp table t1 (tta varchar, ttb varchar);
create temp table t2 (tta varchar, ttb varchar);
insert into t1 values('a', '1');
insert into t1 values('a', '2');
insert into t1 values('tta', '3');
insert into t1 values('ttb', '4');
insert into t2 select pg_attribute.attname,t1.ttb from pg_attribute join t1 on
pg_attribute.attname = t1.tta;
$ psql -f catalog.sql -d postgres
CREATE TABLE
CREATE TABLE
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 0
The join result should be as below for a new database.
INSERT 0 4
tta | ttb
-----+-----
tta | 3
ttb | 4
tta | 3
ttb | 4
(4 rows)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)