Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-2766

HIVE: Inserted row into a hive table has gone missing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3
    • 2.3
    • sql-exe
    • None

    Description

      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.
      >>

      Attachments

        Issue Links

          Activity

            People

              sandhya Sandhya Sundaresan
              sandhya Sandhya Sundaresan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: