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

Decimal value is displayed as rounded when selecting where clause with that decimal value.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.1.0
    • 2.3.0
    • None
    • None

    Description

      Create a table withe a column of decimal type(38,18) and insert '4327269606205.029297'. Then select with that value displays its rounded value, which is 4327269606205.029300000000000000

      0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> drop table if exists test;
      No rows affected (0.229 seconds)
      0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4>
      0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> create table test (dc decimal(38,18));
      No rows affected (0.125 seconds)
      0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4>
      0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> insert into table test values (4327269606205.029297);
      No rows affected (2.372 seconds)
      0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4>
      0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> select * from test;
      +-----------------------------------+--+
      |              test.dc              |
      +-----------------------------------+--+
      | 4327269606205.029297000000000000  |
      +-----------------------------------+--+
      1 row selected (0.123 seconds)
      0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4>
      0: jdbc:hive2://os-r7-mvjkcu-hiveserver2-11-4> select * from test where dc = 4327269606205.029297000000000000;
      +-----------------------------------+--+
      |              test.dc              |
      +-----------------------------------+--+
      | 4327269606205.029300000000000000  |
      +-----------------------------------+--+
      1 row selected (0.109 seconds)
      

      Attachments

        1. HIVE-13945.01.patch
          7 kB
          Sergey Shelukhin
        2. HIVE-13945.02.patch
          1.75 MB
          Sergey Shelukhin
        3. HIVE-13945.03.patch
          2.62 MB
          Sergey Shelukhin
        4. HIVE-13945.03.patch
          2.08 MB
          Sergey Shelukhin
        5. HIVE-13945.04.patch
          2.46 MB
          Sergey Shelukhin
        6. HIVE-13945.05.patch
          2.49 MB
          Sergey Shelukhin
        7. HIVE-13945.06.patch
          2.49 MB
          Sergey Shelukhin
        8. HIVE-13945.patch
          7 kB
          Sergey Shelukhin

        Issue Links

          Activity

            People

              sershe Sergey Shelukhin
              taksaito Takahiko Saito
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: