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

Creating a persistent sample table on a Hive table fails with some columns

    XMLWordPrintableJSON

Details

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

    Description

      The following reproduces the problem.

      First, create and populate a Hive table that uses the column name "_DIVISION_1_". (In Hive, one uses backticks to define delimited column names rather than double quotes as in standard SQL.):

      hive> create table dave2( a int, `_DIVISION_1_` int)
       > stored as textfile
       > ;

      OK
      Time taken: 0.122 seconds
      hive> insert into dave2 values (1,2),(3,4),(5,6),(7,8);

      Then, in Trafodion sqlci, attempt to create a random sample. This will fail:

      >>update statistics for table hive.hive.dave2 create sample random 90 percent;
      *** ERROR[9200] UPDATE STATISTICS for table HIVE.HIVE.DAVE2 encountered an error (4023) from statement Process_Query.

      *** ERROR[4023] The degree of each row value constructor (1) must equal the degree of the target table column list (2).

      *** ERROR[8822] The statement was not prepared.--- SQL operation failed with errors.
      >>

      The probable cause of the problem is that "_DIVISION_1_" is assumed in Trafodion to be a derived column, but this assumption is incorrect for Hive tables.

       

      Attachments

        Issue Links

          Activity

            People

              dbirdsall Dave Birdsall
              dbirdsall Dave Birdsall
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: