Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-1555

IllegalStateException in querying three dimensional json array

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.7.0
    • 0.8.0
    • Execution - Data Types
    • None

    Description

      code base:
      #Mon Oct 13 15:16:16 PDT 2014
      git.commit.id.abbrev=cd6dd9c

      I have a json array like this inside a json file
      "array_array":[["hello", "yeah"], ["a", "b"], [["c", "d"], ["e", "f", "g"]],

      Query this array gives me the following exception:
      0: jdbc:drill:schema=dfs> select array_array from `complex.json`;
      Query failed: Screen received stop request sent. Needed to be in state INIT or IN_LIST but in mode IN_VARCHAR [2718c521-f05f-49bd-adbd-7834623d492e]

      Error: exception while executing query: Failure while trying to get next result batch. (state=,code=0)

      Here is the exception in drill bit.log:
      java.lang.IllegalStateException: Needed to be in state INIT or IN_LIST but in mode IN_VARCHAR
      at org.apache.drill.exec.vector.complex.impl.RepeatedListWriter.list(RepeatedListWriter.java:162) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
      at org.apache.drill.exec.vector.complex.fn.JsonReader.writeData(JsonReader.java:319) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
      at org.apache.drill.exec.vector.complex.fn.JsonReader.writeData(JsonReader.java:319) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
      at org.apache.drill.exec.vector.complex.fn.JsonReader.writeData(JsonReader.java:216) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
      at org.apache.drill.exec.vector.complex.fn.JsonReader.writeToVector(JsonReader.java:146) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
      at org.apache.drill.exec.vector.complex.fn.JsonReader.write(JsonReader.java:130) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
      at org.apache.drill.exec.vector.complex.fn.JsonReaderWithState.write(JsonReaderWithState.java:73) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
      at org.apache.drill.exec.store.easy.json.JSONRecordReader2.next(JSONRecordReader2.java:111) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
      at org.apache.drill.exec.physical.impl.ScanBatch.next(ScanBatch.java:158) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
      at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:117) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
      at org.apache.drill.exec.physical.impl.producer.ProducerConsumerBatch$Producer.run(ProducerConsumerBatch.java:128) ~[drill-java-exec-0.7.0-incubating-SNAPSHOT-rebuffed.jar:0.7.0-incubating-SNAPSHOT]
      at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
      09:47:34.824 [10acefc4-3012-4a7e-9f2d-5be7292663c7:frag:0:0] ERROR o.a.d.e.w.f.AbstractStatusReporter - Error dd2c9275-61d9-4604-9faf-c6977247cf4b: Failure while running fragment.

      Attachments

        1. DRILL-1555.1.patch.txt
          4 kB
          Hanifi Gunes

        Activity

          People

            hgunes Hanifi Gunes
            cchang@maprtech.com Chun Chang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: