Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-18997

Hive column casting from decimal to double is resulting in NULL

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.0
    • Fix Version/s: None
    • Component/s: CLI, distribution
    • Labels:
      None
    • Environment:

      Hive CLI  and cloudera 5.8.3 distribution

      Description

      I have hive table table1 schema of the table looks like this

      {{[CREATE TABLE table1(p_decimal1 DECIMAL(38,5)) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE] }}

      and i have below value in the table

      {{row : col(p_decimal1) row1 : 12345123451234512345123.45123 }}

      in later stage if i execute

      {{select CAST(p_decimal1 AS DOUBLE) from table1; }}

      query then I am getting NULL as a output. 

      expected output should be non-null value.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ranga7261 Rangaswamy Narayan
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: