You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/10/06 05:27:02 UTC

[jira] [Commented] (TRAFODION-2766) HIVE: Inserted row into a hive table has gone missing

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

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

GitHub user sandhyasun opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/1259

    Fix for missing rows when doing dml to hive tables [TRAFODION-2766]

    Fix to make the generation of the underlying filenames more unique.
    This was also the cause of intermittent failure of seabase/TEST031 . So removing the KNOWN diff file created for that. 

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

    $ git pull https://github.com/sandhyasun/incubator-trafodion traf_misc

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

    https://github.com/apache/incubator-trafodion/pull/1259.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 #1259
    
----
commit 749295ad774620d49db79d961b1bbacac8d589c7
Author: Sandhya Sundaresan <sa...@apache.org>
Date:   2017-09-11T17:52:42Z

    Changes to handle errors during drop of lob tables that leave the table inconsistent.

commit f6505ab79a7d0d7d1462b19c19a4133a10c9cdcb
Author: Sandhya Sundaresan <sa...@apache.org>
Date:   2017-10-02T19:57:13Z

    Merge remote branch 'origin/master' into traf_misc

commit f49b86f6c1c0ae17d5d4f3366b421e774f7ce56a
Author: Sandhya Sundaresan <sa...@apache.org>
Date:   2017-10-06T05:22:44Z

    Fix to make hive hdfs filenames more unique

----


> HIVE: Inserted row into a hive table has gone missing
> -----------------------------------------------------
>
>                 Key: TRAFODION-2766
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2766
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-exe
>    Affects Versions: 2.3-incubating
>            Reporter: Sandhya Sundaresan
>            Assignee: Sandhya Sundaresan
>
> An inserted row into a hive table would go missing in various circumstances. As shown in the following occurrence, the first 2 inserts were executed fine. Select afterwards also showed that the rows were there:
> 1st insert: (C_CHAR10, P_CHAR10) = ('STR_1_01', 'STR_1_01')
> 2nd insert: (C_CHAR10, P_CHAR10) = (NULL, 'STR_1_02')
> Then the 3rd insert inserted a new row, which was inserted fine too:
> 3rd insert: (C_CHAR10, P_CHAR10) = ('STR_1_03', NULL)
> But the select statement afterwards only got 2 rows back. The row from the 2nd insert (C_CHAR10, P_CHAR10) = (NULL, 'STR_1_02') has gone missing after the 3rd insert took place. This doesn't appear to be a select problem, since a select from the hive shell in the end doesn't show the row from the 2nd insert either.
> Simpler testcase :
> cqd hive_max_string_length_in_bytes '10';
> process hive statement 'drop table t031hive1';
> process hive statement 'create table t031hive1 (a int, b timestamp, c string)';
> insert into hive.hive.t031hive1 values ('1', '2017-01-01 10:10:10', 2);
> --select * from hive.hive.t031hive1;
> insert into hive.hive.t031hive1 values ('2', '2017-01-02 11:11:11', 3),
>                          ('3', '2017-01-03 11:11:11', 4),
>                          (4, timestamp '2017-01-04 11:11:11', '5');
>                                     
> --select * from hive.hive.t031hive1;
> insert into hive.hive.t031hive1 values (2, '2017-01-02 11:11:11', 'a'),
>                           (111111111111, '2017-01-03 11:11:11', 'b');
> select * from hive.hive.t031hive1;
> >>process hive statement 'create table t031hive1 (a int, b timestamp, c string)';
> --- SQL operation complete.
> >>insert into hive.hive.t031hive1 values ('1', '2017-01-01 10:10:10', 2);
> --- 1 row(s) inserted.
> >>insert into hive.hive.t031hive1 values ('2', '2017-01-02 11:11:11', 3),
> +>                          ('3', '2017-01-03 11:11:11', 4),
> +>                          (4, timestamp '2017-01-04 11:11:11', '5');
> --- 3 row(s) inserted.
> >>
> >>-- this insert should return overflow error
> >>insert into hive.hive.t031hive1 values (2, '2017-01-02 11:11:11', 'a'),
> +>                          (111111111111, '2017-01-03 11:11:11', 'b');
> *** ERROR[8411] A numeric overflow occurred during an arithmetic computation or data conversion. Conversion of Source Type:LARGEINT(REC_BIN64_SIGNED) Source Value:111111111111 to Target Type:INTEGER SIGNED(REC_BIN32_SIGNED).
> --- 0 row(s) inserted.
> >>
> >>select * from hive.hive.t031hive1;
> A            B                           C         
> -----------  --------------------------  ----------
>           1  2017-01-01 10:10:10.000000  2         
> --- 1 row(s) selected.
> >>



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)