[ 
https://issues.apache.org/jira/browse/TRAFODION-2988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

chenyunren updated TRAFODION-2988:
----------------------------------
    Description: 
This query preparation comes from an existing regression test and it used to 
work fine. Now it returns a 2006 internal error at mdam.cpp:1611 when the CQD 
HBASE_HASH2_PARTITIONING is turned off.

>>showddl t1;

CREATE TABLE TRAFODION.T1
   (
     O_ORDERKEY INT NO DEFAULT NOT NULL NOT DROPPABLE NOT
       SERIALIZED
   , O_CUSTKEY INT NO DEFAULT NOT NULL NOT DROPPABLE NOT
       SERIALIZED
   , O_ORDERSTATUS CHAR(1) CHARACTER SET ISO88591 COLLATE
       DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED
   , O_TOTALPRICE NUMERIC(12, 2) NO DEFAULT NOT NULL NOT
       DROPPABLE NOT SERIALIZED
   , O_ORDERDATE DATE NO DEFAULT NOT NULL NOT DROPPABLE NOT
       SERIALIZED
   , O_ORDERPRIORITY CHAR(15) CHARACTER SET ISO88591 COLLATE
       DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED
   , O_CLERK CHAR(15) CHARACTER SET ISO88591 COLLATE
       DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED
   , O_SHIPPRIORITY INT NO DEFAULT NOT NULL NOT DROPPABLE NOT
       SERIALIZED
   , O_COMMENT VARCHAR(79) CHARACTER SET ISO88591 COLLATE
       DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED
   , PRIMARY KEY (O_ORDERKEY ASC)
   )
   SALT USING 8 PARTITIONS
  ATTRIBUTES ALIGNED FORMAT NAMESPACE 'TRAF_QATEST'
 ;

– GRANT SELECT, INSERT, DELETE, UPDATE, REFERENCES ON TRAFODION.T1 TO DB__ROOT 
WITH GRANT OPTION;

— SQL operation complete.
 >>select count(*) from t1;

(EXPR)
 --------------------

             3000000

— 1 row(s) selected.
 >>prepare XX from select * from t1 where o_orderkey > 909000 or o_orderkey < 
 >>1500;

— SQL command prepared.
 >>
 >>cqd HBASE_HASH2_PARTITIONING 'OFF';

— SQL operation complete.
 >>prepare XX from select * from t1 where o_orderkey > 909000 or o_orderkey < 
 >>1500;

ERROR[2006] Internal error: assertion failure (NOT commonPreds.isEmpty()) in 
file ../optimizer/mdam.cpp at line 1611.

ERROR[8822] The statement was not prepared.

 

Need update statistics first.

  was:
This query preparation comes from an existing regression test and it used to 
work fine. Now it returns a 2006 internal error at mdam.cpp:1611 when the CQD 
HBASE_HASH2_PARTITIONING is turned off.

This is seen on the AdvEnt2.3 20171016 daily build:

>>showddl g_tpch2x.orders;

CREATE TABLE TRAFODION.G_TPCH2X.ORDERS
   (
     O_ORDERKEY INT NO DEFAULT NOT NULL NOT DROPPABLE NOT
       SERIALIZED
   , O_CUSTKEY INT NO DEFAULT NOT NULL NOT DROPPABLE NOT
       SERIALIZED
   , O_ORDERSTATUS CHAR(1) CHARACTER SET ISO88591 COLLATE
       DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED
   , O_TOTALPRICE NUMERIC(12, 2) NO DEFAULT NOT NULL NOT
       DROPPABLE NOT SERIALIZED
   , O_ORDERDATE DATE NO DEFAULT NOT NULL NOT DROPPABLE NOT
       SERIALIZED
   , O_ORDERPRIORITY CHAR(15) CHARACTER SET ISO88591 COLLATE
       DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED
   , O_CLERK CHAR(15) CHARACTER SET ISO88591 COLLATE
       DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED
   , O_SHIPPRIORITY INT NO DEFAULT NOT NULL NOT DROPPABLE NOT
       SERIALIZED
   , O_COMMENT VARCHAR(79) CHARACTER SET ISO88591 COLLATE
       DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED
   , PRIMARY KEY (O_ORDERKEY ASC)
   )
   SALT USING 8 PARTITIONS
  ATTRIBUTES ALIGNED FORMAT NAMESPACE 'TRAF_QATEST'
 ;

– GRANT SELECT, INSERT, DELETE, UPDATE, REFERENCES ON TRAFODION.G_TPCH2X.ORDERS 
TO DB__ROOT WITH GRANT OPTION;

— SQL operation complete.
 >>select count(*) from g_tpch2x.orders;

(EXPR)
 --------------------

             3000000

— 1 row(s) selected.
 >>prepare XX from select * from g_tpch2x.orders where o_orderkey > 909000 or 
 >>o_orderkey < 1500;

— SQL command prepared.
 >>
 >>cqd HBASE_HASH2_PARTITIONING 'OFF';

— SQL operation complete.
 >>prepare XX from select * from g_tpch2x.orders where o_orderkey > 909000 or 
 >>o_orderkey < 1500;

ERROR[2006] Internal error: assertion failure (NOT commonPreds.isEmpty()) in 
file ../optimizer/mdam.cpp at line 1611.

ERROR[8822] The statement was not prepared.

 

Need update statistics first.


> Prepare query returns 2006 internal error
> -----------------------------------------
>
>                 Key: TRAFODION-2988
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2988
>             Project: Apache Trafodion
>          Issue Type: Bug
>            Reporter: chenyunren
>            Assignee: chenyunren
>            Priority: Major
>
> This query preparation comes from an existing regression test and it used to 
> work fine. Now it returns a 2006 internal error at mdam.cpp:1611 when the CQD 
> HBASE_HASH2_PARTITIONING is turned off.
> >>showddl t1;
> CREATE TABLE TRAFODION.T1
>    (
>      O_ORDERKEY INT NO DEFAULT NOT NULL NOT DROPPABLE NOT
>        SERIALIZED
>    , O_CUSTKEY INT NO DEFAULT NOT NULL NOT DROPPABLE NOT
>        SERIALIZED
>    , O_ORDERSTATUS CHAR(1) CHARACTER SET ISO88591 COLLATE
>        DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED
>    , O_TOTALPRICE NUMERIC(12, 2) NO DEFAULT NOT NULL NOT
>        DROPPABLE NOT SERIALIZED
>    , O_ORDERDATE DATE NO DEFAULT NOT NULL NOT DROPPABLE NOT
>        SERIALIZED
>    , O_ORDERPRIORITY CHAR(15) CHARACTER SET ISO88591 COLLATE
>        DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED
>    , O_CLERK CHAR(15) CHARACTER SET ISO88591 COLLATE
>        DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED
>    , O_SHIPPRIORITY INT NO DEFAULT NOT NULL NOT DROPPABLE NOT
>        SERIALIZED
>    , O_COMMENT VARCHAR(79) CHARACTER SET ISO88591 COLLATE
>        DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED
>    , PRIMARY KEY (O_ORDERKEY ASC)
>    )
>    SALT USING 8 PARTITIONS
>   ATTRIBUTES ALIGNED FORMAT NAMESPACE 'TRAF_QATEST'
>  ;
> – GRANT SELECT, INSERT, DELETE, UPDATE, REFERENCES ON TRAFODION.T1 TO 
> DB__ROOT WITH GRANT OPTION;
> — SQL operation complete.
>  >>select count(*) from t1;
> (EXPR)
>  --------------------
>              3000000
> — 1 row(s) selected.
>  >>prepare XX from select * from t1 where o_orderkey > 909000 or o_orderkey < 
> 1500;
> — SQL command prepared.
>  >>
>  >>cqd HBASE_HASH2_PARTITIONING 'OFF';
> — SQL operation complete.
>  >>prepare XX from select * from t1 where o_orderkey > 909000 or o_orderkey < 
> 1500;
> ERROR[2006] Internal error: assertion failure (NOT commonPreds.isEmpty()) in 
> file ../optimizer/mdam.cpp at line 1611.
> ERROR[8822] The statement was not prepared.
>  
> Need update statistics first.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to