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

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

GitHub user DaveBirdsall opened a pull request:

    https://github.com/apache/trafodion/pull/1488

    [TRAFODION-3002] Fix UPDATE STATS for certain INTERVAL data types

    Formerly, UPDATE STATS would fail with an internal error when processing an 
INTERVAL DAY(13) TO SECOND(0) column. It would also fail with a core when 
processing an INTERVAL DAY(8) TO SECOND(0) column. This has been fixed.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/DaveBirdsall/trafodion Trafodion3002

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafodion/pull/1488.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1488
    
----

----


> UPDATE STATS fails on certain INTERVAL columns
> ----------------------------------------------
>
>                 Key: TRAFODION-3002
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-3002
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>    Affects Versions: 2.3
>            Reporter: David Wayne Birdsall
>            Assignee: David Wayne Birdsall
>            Priority: Major
>
> The following script demonstrates the failures:
> {{drop schema if exists mytest cascade;}}
> {{create schema mytest;}}
> {{set schema mytest;}}
> {{create table t1 (c1 interval day(13) to second(0));}}
> {{insert into t1 values}}
> {{(interval '1111111111111:11:11:11' day(13) to second(0)),}}
> {{(interval '2222222222222:22:22:22' day(13) to second(0));}}
> {{select * from t1 order by 1;}}
> {{update statistics for table t1 clear;}}
> {{update statistics for table t1 on every column;}}
> {{create table t2 (c1 interval day(8) to second(0));}}
> {{insert into t2 values}}
> {{(interval '11111111:11:11:11' day(8) to second(0)),}}
> {{(interval '22222222:22:22:22' day(8) to second(0));}}
> {{select * from t2 order by 1;}}
> {{update statistics for table t2 clear;}}
> {{update statistics for table t2 on every column;}}
> When executed, the UPDATE STATISTICS command on T1 fails as follows:
> {{>>update statistics for table t1 on every column;}}
> {{*** ERROR[9200] UPDATE STATISTICS for table TRAFODION.MYTEST.T1 encountered 
> an error (3044) from statement PREPARE_TO_READ_COLS_INTO_MEM.}}
> {{*** ERROR[3044] The interval SECOND(18,6) is not valid.}}
> {{*** ERROR[8822] The statement was not prepared.}}
> {{*** ERROR[9200] UPDATE STATISTICS for table TRAFODION.MYTEST.T1 encountered 
> an error (3044) from statement HSCursor::fetchRowset().}}
> {{*** ERROR[3044] The interval SECOND(18,6) is not valid.}}
> {{*** ERROR[8822] The statement was not prepared.}}
> {{*** ERROR[8845] An internal error occurred: root_tcb is null.}}
> {{*** ERROR[9200] UPDATE STATISTICS for table TRAFODION.MYTEST.T1 encountered 
> an error (3044) from statement READ_COLS_INTO_MEM.}}
> {{*** ERROR[3044] The interval SECOND(18,6) is not valid.}}
> {{*** ERROR[8822] The statement was not prepared.}}
> {{*** ERROR[8845] An internal error occurred: root_tcb is null.}}
> {{--- SQL operation failed with errors.}}
> {{>>}}
> The UPDATE STATISTICS on table T2 on the other hand, fails with an executor 
> assertion (and a core).



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

Reply via email to