Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-14556

Load data into text table fail caused by IndexOutOfBoundsException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0, 2.2.0
    • Fix Version/s: 2.3.0
    • Component/s: File Formats
    • Labels:
      None

      Description

      echo "1" > foo.txt
      
      0: jdbc:hive2://189.39.151.74:21066/> create table foo(id int) stored as textfile;
      No rows affected (1.846 seconds)
      0: jdbc:hive2://189.39.151.74:21066/> load data local inpath '/foo.txt' into table foo;
      Error: Error while compiling statement: FAILED: SemanticException Unable to load data to destination table. Error: java.lang.IndexOutOfBoundsException (state=42000,code=40000)
      

      Exception:

      2016-08-17 17:15:36,301 | ERROR | HiveServer2-Handler-Pool: Thread-55 | FAILED: SemanticException Unable to load data to destination table. Error: java.lang.IndexOutOfBoundsException
      org.apache.hadoop.hive.ql.parse.SemanticException: Unable to load data to destination table. Error: java.lang.IndexOutOfBoundsException
              at org.apache.hadoop.hive.ql.parse.LoadSemanticAnalyzer.ensureFileFormatsMatch(LoadSemanticAnalyzer.java:356)
              at org.apache.hadoop.hive.ql.parse.LoadSemanticAnalyzer.analyzeInternal(LoadSemanticAnalyzer.java:236)
              at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:238)
              at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:473)
              at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:325)
              at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1358)
              at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1340
      

        Attachments

        1. HIVE-14556.1.patch
          0.8 kB
          Niklaus Xiao

          Issue Links

            Activity

              People

              • Assignee:
                niklaus.xiao Niklaus Xiao
                Reporter:
                niklaus.xiao Niklaus Xiao
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: