Hive
  1. Hive
  2. HIVE-4523

round() function with specified decimal places not consistent with mysql

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.7.1
    • Fix Version/s: 0.13.0
    • Component/s: UDF
    • Labels:

      Description

      // hive
      hive> select round(150.000, 2) from temp limit 1;
      150.0

      hive> select round(150, 2) from temp limit 1;
      150.0

      // mysql
      mysql> select round(150.000, 2) from DUAL limit 1;
      round(150.000, 2)
      150.00

      mysql> select round(150, 2) from DUAL limit 1;
      round(150, 2)
      150

      http://dev.mysql.com/doc/refman/5.1/en/mathematical-functions.html#function_round

      1. HIVE-4523.8.patch
        45 kB
        Xuefu Zhang
      2. HIVE-4523.7.patch
        45 kB
        Xuefu Zhang
      3. HIVE-4523.6.patch
        45 kB
        Xuefu Zhang
      4. HIVE-4523.5.patch
        42 kB
        Xuefu Zhang
      5. HIVE-4523.4.patch
        42 kB
        Xuefu Zhang
      6. HIVE-4523.3.patch
        39 kB
        Xuefu Zhang
      7. HIVE-4523.2.patch
        29 kB
        Xuefu Zhang
      8. HIVE-4523.1.patch
        28 kB
        Xuefu Zhang
      9. HIVE-4523.patch
        21 kB
        Xuefu Zhang

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Xuefu Zhang
              Reporter:
              Fred Desing
            • Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development