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

Fail to query from hive tables that have decimal columns

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Duplicate
    • 0.5.0
    • 0.6.0
    • Storage - Hive
    • None

    Description

      git.commit.id.abbrev=687b9b0

      I have a table in hive with the following schema:

      hive> describe voter_test;
      OK
      voter_id int
      name varchar(30)
      age tinyint
      registration string
      contributions decimal(6,2)
      voterzone smallint
      create_time timestamp

      When I run any select against this table from drill, it fails with parsing error:
      0: jdbc:drill:schema=hive> select * from voter_test limit 5;
      Query failed: Failure while parsing sql. Error: ',', ':', or ';' expected at position 7 from 'decimal(6,2)' [0:decimal, 7:(, 8:6, 9:,, 10:2, 11:)] [2a97a3ae-b9cd-409b-bab6-359febb023b3]

      Error: exception while executing query: Failure while trying to get next result batch. (state=,code=0)

      I went back to hive and created another table using float instead of decimal for the contributions field and the queries against this table run successfully.

      hive> describe voter_test1;
      OK
      voter_id int
      name varchar(30)
      age tinyint
      registration string
      contributions float
      voterzone smallint
      create_time timestamp

      Attachments

        Issue Links

          Activity

            People

              adityakishore Aditya Kishore
              knguyen Krystal
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: