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

UnsupportedOperationException: Unable to get holder type for minor type [LATE] and mode [OPTIONAL]

    XMLWordPrintableJSON

    Details

      Description

      I tried this query on some of our JSON files that are stored in a S3 Bucket, in which I tried to convert JSON objects (application, application_fee) into varchar:

      SELECT
           CONCAT(
               '"', CONVERT_TO(_stg.data.application, 'JSON'), '"'
               , ',', '"', CONVERT_TO(_stg.data.application_fee, 'JSON'), '"'
           ) as JSONs
       FROM (
           SELECT
               flatten(js.data) AS data
           FROM
               s3_bucket.`<PATH_TO_FILE_IN_S3>` AS js
           ) _stg
      

      On some of the datasets the query failed and I got this error message

      org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: UnsupportedOperationException: Unable to get holder type for minor type [LATE] and mode [OPTIONAL] Fragment 0:0 [Error Id: 5e74e125-de22-46fa-8d31-233d0fc40140

      The dataset, on which the query failed looks like following:

      {
          "data": 
              [
                  {
                      "application": null,
                      "application_fee": null,
                      "amount": 1
                  },
                  {
                      "application": 
                          {
                               "id": "some_id",
                               "name": "Some App",
                               "object": "application"
                          },
                      "application_fee": null,
                      "amount": 5
                  }
              ],
          "has_more": false,
          "object": "list",
          "url": "/v1/charges"
      }
      

      I ran some further tests on the query and found out that the query only fails at object "application_fee", which is null in both arrays of object "data". Which might explain why I never ran into this error in the other datasets (no object arrays there are null).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tta-scalefree Trung Ta
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: