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

Drill fails to implicit cast hive tinyint and smallint data as int

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.0
    • Future
    • Storage - Hive
    • None

    Description

      I have the following hive table:
      describe `hive.default`.voter_hive;
      --------------------------------------

      COLUMN_NAME DATA_TYPE IS_NULLABLE

      --------------------------------------

      voter_id SMALLINT YES
      name VARCHAR YES
      age TINYINT YES
      registration VARCHAR YES
      contributions DECIMAL YES
      voterzone INTEGER YES
      create_time TIMESTAMP YES

      --------------------------------------

      If just include the voter_id and age fields in the select, then the query works fine. However if I include them in the where clause, the query would fail. For example:

      select voter_id, name, age from voter_hive where age < 30;
      Error: 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: [castINT(TINYINT-OPTIONAL)]. Full expression: --UNKNOWN EXPRESSION-..

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              knguyen Krystal
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: