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

Implement Is Not Null/Is Null on List of objects - [isnotnull(MAP-REPEATED)] error

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      It is not possble to use the IS NULL / IS NOT NULL operator on an attribuite that contains a list of "object". (it is working with a list of scalar types)

      Query:

      select *
      from dfs.`/working/json_array/*.json` p
      where p.tags IS NOT NULL
      

      Document:

      {
        "name" : "PPRODUCT_002",
        "price" : 200.00,
        "tags" : [ { "type" : "sports" } , { "type" : "ocean" }]
      }
      

      Error:

      org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: org.apache.drill.exec.exception.SchemaChangeException: Failure while trying to materialize incoming schema. Errors: Error in expression at index -1. Error: Missing function implementation: [isnotnull(MAP-REPEATED)]. Full expression: --UNKNOWN EXPRESSION--.. Fragment 0:0 [Error Id: 384e6b86-ce17-4eb9-b5eb-27870a341c90 on 192.168.99.13:31010]
      

      Workaround:
      By using a sub element it is working, for example:

      select *
      from dfs.`/Users/tgrall/working/json_array/*.json` p
      where p.tags.type IS NULL
      

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mehant Mehant Baid
            tgrall Tugdual Grall

            Dates

              Created:
              Updated:

              Issue deployment