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

Load data into text table fail caused by IndexOutOfBoundsException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0, 2.2.0
    • 2.3.0
    • File Formats
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: