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

Filter on a field in a nested repeated type throws an exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0
    • Execution - Data Types
    • None

    Description

      git.commit.id.abbrev=3c6d0ef

      Data Set :

      {
        "rm": [
          {"rptd": [{ "a": "foo"},{"b":"boo"}]}
        ],
        "rm1":[{"a":"foo"},{"b":"boo"}]
      }
      

      The below query tries to apply a filter on field which does not exist. However the field is still present in a different element of the same array.

      select rm[0].rptd[0] from `temp.json` where rm[0].rptd[0].b = 'boo';
      Query failed: Query failed: Failure while running fragment., index: -4, length: 4 (expected: range(0, 16384)) [ 01887113-c758-41bf-96d1-5eede9b1e411 on qa-node191.qa.lab:31010 ]
      [ 01887113-c758-41bf-96d1-5eede9b1e411 on qa-node191.qa.lab:31010 ]
      

      The above query should result in an empty result.The above error only happens when we apply a filter on a nested array element. The below query works fine

      0: jdbc:drill:schema=dfs.drillTestDir> select rm1[0].a from `nested.json` where rm1[0].b = 'boo';
      +------------+
      |   EXPR$0   |
      +------------+
      +------------+
      

      Attached the log file.

      Attachments

        1. error.log
          6 kB
          Rahul Kumar Challapalli

        Activity

          People

            mehant Mehant Baid
            rkins Rahul Kumar Challapalli
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: