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

Classcast exception while input data has an array field.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.4.0
    • 0.4.0
    • Execution - Data Types
    • None

    Description

      I am trying to load the data which is of the following format

      {
          "test": "ABC",
          "test2": [1,2,3],
          "a": "drill"
      }
      {
          "test": "abc",
          "test2": [1,2,3,4],
          "a": "apache"
      }
      

      and executing SELECT query on the above data. While doing that I am getting the following exception

      java.lang.ClassCastException: org.apache.drill.exec.vector.NullableVarCharVector cannot be cast to org.apache.drill.exec.vector.RepeatedVarCharVector
      	at org.apache.drill.exec.store.easy.json.JSONRecordReader$ReadType.addValueToVector(JSONRecordReader.java:459)
      	at org.apache.drill.exec.store.easy.json.JSONRecordReader$ReadType.recordData(JSONRecordReader.java:389)
      	at org.apache.drill.exec.store.easy.json.JSONRecordReader$ReadType.readRecord(JSONRecordReader.java:295)
      	at org.apache.drill.exec.store.easy.json.JSONRecordReader.next(JSONRecordReader.java:134)
      

      Attachments

        1. DRILL-446.patch
          3 kB
          Bhallamudi Venkata Siva Kamesh

        Activity

          People

            Unassigned Unassigned
            kam_iitkgp Bhallamudi Venkata Siva Kamesh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: