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

Drill fails when querying a nested array within a repeated map.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.7.0
    • None
    • None

    Description

      Given the following JSON input data:

      { "a":[{"b": [["str1","str2"], ["str3", "str4"]]}] }
      { "a":[{"b": [["str10","str20"], ["str30", "str40"]]}] }
      

      If we want to retrieve the first element in array b, which is the first element in array a, using the following query, Drill will fail with error:

      select t.a[0].b[0] from dfs.`/Users/jni/work/data/json/samplejson.json` t;
      
      Query failed: Failure while running fragment., You tried to read a [CopyAsValueVarChar] type when you are using a field reader of type [SingleLikeRepeatedMapReaderImpl]. [ d655b148-5c0e-4293-8472-8ee93d6df801 on adminisorsmbp53:31010 ]
      

      Attachments

        Activity

          People

            DrillCommitter DrillCommitter
            jni Jinfeng Ni
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: