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

Support specifying scale and precision with Hive decimal type

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.11.0
    • 0.13.0
    • Query Processor, Types
    • None
    • Incompatible change

    Description

      HIVE-2693 introduced support for Decimal datatype in Hive. However, the current implementation has unlimited precision and provides no way to specify precision and scale when creating the table.

      For example, MySQL allows users to specify scale and precision of the decimal datatype when creating the table:

      CREATE TABLE numbers (a DECIMAL(20,2));
      

      Hive should support something similar too.

      Attachments

        1. remove_prec_scale.diff
          8 kB
          Jason Dere
        2. HIVE-3976.patch
          55 kB
          Xuefu Zhang
        3. HIVE-3976.1.patch
          57 kB
          Xuefu Zhang
        4. HIVE-3976.2.patch
          69 kB
          Xuefu Zhang
        5. HIVE-3976.3.patch
          61 kB
          Xuefu Zhang
        6. HIVE-3976.4.patch
          240 kB
          Xuefu Zhang
        7. HIVE-3976.5.patch
          255 kB
          Xuefu Zhang
        8. HIVE-3976.6.patch
          255 kB
          Xuefu Zhang
        9. HIVE-3976.7.patch
          254 kB
          Xuefu Zhang
        10. HIVE-3976.8.patch
          255 kB
          Xuefu Zhang
        11. HIVE-3976.9.patch
          255 kB
          Xuefu Zhang
        12. HIVE-3976.10.patch
          256 kB
          Xuefu Zhang
        13. HIVE-3976.11.patch
          256 kB
          Xuefu Zhang

        Issue Links

          Activity

            People

              xuefuz Xuefu Zhang
              mgrover Mark Grover
              Votes:
              1 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: