hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chunling Wang (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HAWQ-1132) HAWQ should throw error when we insert data in a hash table and the virtual segment number is 1
Date Tue, 01 Nov 2016 10:43:58 GMT
Chunling Wang created HAWQ-1132:
-----------------------------------

             Summary: HAWQ should throw error when we insert data in a hash table and the
virtual segment number is 1
                 Key: HAWQ-1132
                 URL: https://issues.apache.org/jira/browse/HAWQ-1132
             Project: Apache HAWQ
          Issue Type: Bug
          Components: Core, Planner, Query Execution
            Reporter: Chunling Wang
            Assignee: Lei Chang


If we set  virtual segment number is 1, and create a hash table (default hash number is 6),
we will just get a warning message in a no partition table when we insert a tuple. And we
can even not get any message in a partition table. When we select from this table, HAWQ throws
error. 

No partition table:
{code}
postgres=# set enforce_virtual_segment_number = 1;
SET
postgres=# create table t(id int) DISTRIBUTED BY (id);
CREATE TABLE
postgres=# insert into t values(1);
WARNING:  skipping "t" --- error returned: file count 1 in catalog is not in proportion to
the bucket number 6 of hash table with oid=2966724, some data may be lost, if you still want
to continue the query by considering the table as random, set GUC allow_file_count_bucket_num_mismatch
to on and try again.
INFO:  ANALYZE completed. Success: 0, Failure: 1 (t)
INSERT 0 1
postgres=# select * from t;
ERROR:  file count 1 in catalog is not in proportion to the bucket number 6 of hash table
with oid=2966724, some data may be lost, if you still want to continue the query by considering
the table as random, set GUC allow_file_count_bucket_num_mismatch to on and try again. (cdbdatalocality.c:3801)
postgres=#
{code}

Partition table:
{code}
postgres=# set enforce_virtual_segment_number = 1;
SET
postgres=# CREATE TABLE t (id int, rank int, year int, gender char(1), count int ) DISTRIBUTED
BY (id)     PARTITION BY LIST (gender) ( PARTITION girls VALUES ('F'), PARTITION boys VALUES
('M'), DEFAULT PARTITION other );
NOTICE:  CREATE TABLE will create partition "t_1_prt_girls" for table "t"
NOTICE:  CREATE TABLE will create partition "t_1_prt_boys" for table "t"
NOTICE:  CREATE TABLE will create partition "t_1_prt_other" for table "t"
CREATE TABLE
postgres=# insert into t values(51, 1, 1, 'F', 1);
INSERT 0 1
postgres=# select * from t;
ERROR:  file count 1 in catalog is not in proportion to the bucket number 6 of hash table
with oid=2966703, some data may be lost, if you still want to continue the query by considering
the table as random, set GUC allow_file_count_bucket_num_mismatch to on and try again. (cdbdatalocality.c:3801)
postgres=#
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message