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

Accessing a Hive table with long names results in error 8436

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1-incubating
    • 2.1-incubating
    • -exe, sql-exe
    • None

    Description

      If we use a long Hive database name and a long Hive table name, attempts to select from that table from Trafodion fail with SQL error 8436.

      Example: Use the following hive script to create a table via the Hive shell:

      drop database if exists
      Trafodion2434abcdabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
      cascade;

      create database
      Trafodion2434abcdabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
      ;

      use
      Trafodion2434abcdabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
      ;

      drop table if exists ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789;

      create table
      ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
      (
      Column01 int,
      Column02 string
      ) clustered by (Column01) sorted by (Column01) into 4 buckets row format delimited fields terminated by '|';

      insert into
      ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
      values
      (1,'one');

      insert into
      ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
      values
      (2,'two');

      insert into
      ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
      values
      (3,'three');

      insert into
      ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
      values
      (4,'four');

      select * from
      ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
      ;

      exit;

      Next, do the following in sqlci:

      control query default HIVE_MAX_STRING_LENGTH '10';

      set schema hive.Trafodion2434abcdabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
      ;

      showddl ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
      ;

      select * from ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
      ;

      This will fail as follows:

      >>control query default HIVE_MAX_STRING_LENGTH '10';

      — SQL operation complete.
      >>
      >>set schema hive.Trafodion2434abcdabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
      +>;

      — SQL operation complete.
      >>
      >>showddl ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
      +>;

      /* Hive DDL */
      CREATE TABLE PROBLEMTABLESTR1ABCDEFABCDEFGHIJABCDEFGHIJ01234567890123456789012345678901234567890123456789012345678901234567890123456789
      (
      COLUMN01 int
      , COLUMN02 string
      )
      stored as textfile
      ;

      — SQL operation complete.
      >>
      >>select * from ProblemTableSTR1abcdefabcdefghijabcdefghij01234567890123456789012345678901234567890123456789012345678901234567890123456789
      +>;

          • ERROR[8436] Mismatch detected between compiletime and runtime hive table definitions. DataModMismatchDetails:

      — 0 row(s) selected.
      >>

      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: