You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "David Wayne Birdsall (JIRA)" <ji...@apache.org> on 2018/07/16 17:05:00 UTC

[jira] [Created] (TRAFODION-3148) Creating a persistent sample table on a Hive table fails with some columns

David Wayne Birdsall created TRAFODION-3148:
-----------------------------------------------

             Summary: Creating a persistent sample table on a Hive table fails with some columns
                 Key: TRAFODION-3148
                 URL: https://issues.apache.org/jira/browse/TRAFODION-3148
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-cmp
    Affects Versions: 2.3
            Reporter: David Wayne Birdsall
            Assignee: David Wayne Birdsall


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.

 



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