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

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

Sandhya Sundaresan created TRAFODION-2766:
---------------------------------------------

             Summary: 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)