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

ASF GitHub Bot commented on TRAFODION-2988:
-------------------------------------------

Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/trafodion/pull/1474#discussion_r174623263
  
    --- Diff: core/sql/optimizer/mdam.cpp ---
    @@ -2002,7 +2002,8 @@ void Disjuncts::computeCommonPredicates()
              inVidset.next(predId);
              inVidset.advance(predId) )
         {
    -            if(predId.getItemExpr()->getOperatorType() == 
ITM_RANGE_SPEC_FUNC )
    +            //TRAFODION-2988
    +            /*if(predId.getItemExpr()->getOperatorType() == 
ITM_RANGE_SPEC_FUNC )
    --- End diff --
    
    One cosmetic issue. It is better to delete code you are replacing rather 
than commenting it out. The only reason to comment out code is if we are 
temporarily disabling it in hopes of putting it back it later.


> 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
>
> Prepare query returns a 2006 internal error at mdam.cpp:1611 when the CQD 
> HBASE_HASH2_PARTITIONING is turned off.
> >>showddl t1;
> CREATE TABLE TRAFODION.T1
>    (
>      C1 INT NO DEFAULT NOT NULL NOT DROPPABLE NOT
>        SERIALIZED
>    , C2 INT NO DEFAULT NOT NULL NOT DROPPABLE NOT
>        SERIALIZED
>    , C3 CHAR(1) CHARACTER SET ISO88591 COLLATE
>        DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED
>    , C4 NUMERIC(12, 2) NO DEFAULT NOT NULL NOT
>        DROPPABLE NOT SERIALIZED
>    , C5 DATE NO DEFAULT NOT NULL NOT DROPPABLE NOT
>        SERIALIZED
>    , C6 CHAR(15) CHARACTER SET ISO88591 COLLATE
>        DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED
>    , C7 CHAR(15) CHARACTER SET ISO88591 COLLATE
>        DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED
>    , C8 INT NO DEFAULT NOT NULL NOT DROPPABLE NOT
>        SERIALIZED
>    , C9 VARCHAR(79) CHARACTER SET ISO88591 COLLATE
>        DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE NOT SERIALIZED
>    , PRIMARY KEY (C1 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 c1 > 909000 or c1 < 1500;
> — SQL command prepared.
>  >>
>  >>cqd HBASE_HASH2_PARTITIONING 'OFF';
> — SQL operation complete.
>  >>prepare XX from select * from t1 where c1 > 909000 or c1 < 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