[ 
https://issues.apache.org/jira/browse/HAWQ-1455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16013628#comment-16013628
 ] 

Paul Guo commented on HAWQ-1455:
--------------------------------

Closing this one after checking in the patch below.

commit 3461e64801eb2299d46c86f47734b7f000152a10
Author: Paul Guo <paul...@gmail.com>
Date:   Fri May 5 17:47:41 2017 +0800

    HAWQ-1455. Wrong results on CTAS query over catalog

    This reverts the previous fix for HAWQ-512, however to HAWQ-512, it looks 
like
    we could modify the lock related code following gpdb to do a real fix. 
Those code
    was probably deleted during early hawq development.


> 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: Paul Guo
>
> 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)

Reply via email to