You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Alice Chen (JIRA)" <ji...@apache.org> on 2015/07/22 20:17:19 UTC

[jira] [Created] (TRAFODION-540) LP Bug: 1356523 - With hash2 partitioning off, unable to get range partition.

Alice Chen created TRAFODION-540:
------------------------------------

             Summary: LP Bug: 1356523 - With hash2 partitioning off, unable to get range partition.
                 Key: TRAFODION-540
                 URL: https://issues.apache.org/jira/browse/TRAFODION-540
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-cmp
            Reporter: Julie Thai
            Assignee: Qifan Chen
            Priority: Critical
             Fix For: 0.9 (pre-incubation)


For select-order-by-desc key, a query plan with hash2 partitioning is generated. 
After setting cqd HBASE_HASH2_PARTITIONING 'OFF';, a query plan with hash2 partitioning is
still generated. Expected to see range partitoning. 
 
>>explain options 'f' select * from nosalt_1reg_orders order by o_orderkey desc;

LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
---- ---- ---- --------------------  --------  --------------------  ---------

4    .    5    root                                                  3.00E+006
3    .    4    esp_exchange                    1:7(hash2) (m)        3.00E+006
2    .    3    sort                                                  3.00E+006
1    .    2    esp_exchange                    7(hash2):1 (m)        3.00E+006
.    .    1    trafodion_scan                  NOSALT_1REG_ORDERS    3.00E+006

--- SQL operation complete.
>>cqd HBASE_HASH2_PARTITIONING 'OFF';

--- SQL operation complete.
>>explain options 'f' select * from nosalt_1reg_orders order by o_orderkey desc;

LC   RC   OP   OPERATOR              OPT       DESCRIPTION           CARD
---- ---- ---- --------------------  --------  --------------------  ---------

4    .    5    root                                                  3.00E+006
3    .    4    esp_exchange                    1:7(hash2) (m)        3.00E+006
2    .    3    sort                                                  3.00E+006
1    .    2    esp_exchange                    7(hash2):1 (m)        3.00E+006
.    .    1    trafodion_scan                  NOSALT_1REG_ORDERS    3.00E+006

--- SQL operation complete.

CREATE TABLE TRAFODION.HASH2PART.NOSALT_1REG_ORDERS
  (
    O_ORDERKEY                       INT NO DEFAULT NOT NULL NOT DROPPABLE
  , O_CUSTKEY                        INT NO DEFAULT NOT NULL NOT DROPPABLE
  , O_ORDERSTATUS                    CHAR(1) CHARACTER SET ISO88591 COLLATE
      DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
  , O_TOTALPRICE                     NUMERIC(12, 2) NO DEFAULT NOT NULL NOT
      DROPPABLE
  , O_ORDERDATE                      DATE NO DEFAULT NOT NULL NOT DROPPABLE
  , O_ORDERPRIORITY                  CHAR(15) CHARACTER SET ISO88591 COLLATE
      DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
  , O_CLERK                          CHAR(15) CHARACTER SET ISO88591 COLLATE
      DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
  , O_SHIPPRIORITY                   INT NO DEFAULT NOT NULL NOT DROPPABLE
  , O_COMMENT                        VARCHAR(79) CHARACTER SET ISO88591 COLLATE
      DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
  , PRIMARY KEY (O_ORDERKEY ASC)
  )
NO PARTITION
;

>>showstats for table nosalt_1reg_orders on existing columns;

Histogram data for Table TRAFODION.HASH2PART.NOSALT_1REG_ORDERS
Table ID: 2856900347350071

   Hist ID # Ints    Rowcount         UEC Colname(s)
========== ====== =========== =========== ===========================
1871582293     55     3000000     3000000 O_ORDERKEY


--- SQL operation complete.

Encountered on builds 20140730_0830 and 20140812_1740.



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