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

CREATE INDEX on certain long chars fails with Java exceptions

    XMLWordPrintableJSON

Details

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

    Description

      The following session illustrates the issue. Creating an index on a CHAR(32757) succeeds. Creating an index on a CHAR(32766) fails with a good error message (1141). But creating an index on intermediate sizes fails with a Java exception, pointing to some bug with near-boundary conditions.

      >>drop table if exists mytable;--- SQL operation complete.
      >>create table mytable (
      +>c1 char(32757),
      +>c2 char(32758),
      +>c3 char(32765),
      +>c4 char(32766));--- SQL operation complete.
      >>insert into mytable values ('A','A','A','A');--- 1 row(s) inserted.
      >>create index idx1 on mytable (c1);--- SQL operation complete.
      >>create index idx2 on mytable (c2);*** ERROR[8448] Unable to access Hbase interface. Call to ExpHbaseInterface::addToHFile returned error HBASE_ADD_TO_HFILE_ERROR(-713). Cause: java.lang.NegativeArraySizeException
      org.trafodion.sql.HBulkLoadClient.addToHFile(HBulkLoadClient.java:247).

      *** ERROR[1081] Loading of index TRAFODION.SCH.IDX2 failed unexpectedly.

      --- SQL operation failed with errors.
      >>create index idx3 on mytable (c3);

      *** ERROR[8448] Unable to access Hbase interface. Call to ExpHbaseInterface::addToHFile returned error HBASE_ADD_TO_HFILE_ERROR(-713). Cause: java.lang.NegativeArraySizeException
      org.trafodion.sql.HBulkLoadClient.addToHFile(HBulkLoadClient.java:247).

      *** ERROR[1081] Loading of index TRAFODION.SCH.IDX3 failed unexpectedly.

      --- SQL operation failed with errors.
      >>create index idx4 on mytable (c4);

      *** ERROR[1141] Key length 32768 exceeds the maximum allowed key length of 32767.

      --- SQL operation failed with errors.
      >>

      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: