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

SchemaChangeException while querying hive json table

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4.0
    • 1.7.0
    • None
    • MapR-Drill 1.4.0
      Hive-1.2.0

    Description

      getting the SchemaChangeException while querying json documents stored in hive table.

      Error: SYSTEM ERROR: SchemaChangeException: Failure while trying to materialize incoming schema.  Errors:
       
      Error in expression at index -1.  Error: Missing function implementation: [castBIT(VAR16CHAR-OPTIONAL)].  Full expression: --UNKNOWN EXPRESSION--..
      

      minimum reproduce

      created sample json documents using the attached script(randomdata.sh)
      hive>create table simplejson(json string);
      hive>load data local inpath '/tmp/simple.json' into table simplejson;
      now query it through Drill.
      Drill Version
      select * from sys.version;
      +-----------+----------------+-------------+-------------+------------+
      | commit_id | commit_message | commit_time | build_email | build_time |
      +-----------+----------------+-------------+-------------+------------+
      | eafe0a245a0d4c0234bfbead10c6b2d7c8ef413d | DRILL-3901:  Don't do early expansion of directory in the non-metadata-cache case because it already happens during ParquetGroupScan's metadata gathering operation. | 07.10.2015 @ 17:12:57 UTC | Unknown | 07.10.2015 @ 17:36:16 UTC |
      +-----------+----------------+-------------+-------------+------------+
      
      0: jdbc:drill:zk=> select * from hive.`default`.simplejson where GET_JSON_OBJECT(simplejson.json, '$.DocId') = 'DocId2759947' limit 1;
      Error: SYSTEM ERROR: SchemaChangeException: Failure while trying to materialize incoming schema.  Errors:
       
      Error in expression at index -1.  Error: Missing function implementation: [castBIT(VAR16CHAR-OPTIONAL)].  Full expression: --UNKNOWN EXPRESSION--..
      
      Fragment 1:1
      
      [Error Id: 74f054a8-6f1d-4ddd-9064-3939fcc82647 on ip-10-0-0-233:31010] (state=,code=0)
      

      Attachments

        Activity

          People

            vitalii Vitalii Diravka
            vitalii Vitalii Diravka
            Krystal Krystal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: