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

Function ACOS(2) and ASIN(2) should be null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.1, 1.2.2, 2.2.0
    • 3.0.0
    • UDF

    Description

      acos(2) should be null, same as MySQL:

      hive> desc function extended acos;
      OK
      acos(x) - returns the arc cosine of x if -1<=x<=1 or NULL otherwise
      Example:
        > SELECT acos(1) FROM src LIMIT 1;
        0
        > SELECT acos(2) FROM src LIMIT 1;
        NULL
      Time taken: 0.009 seconds, Fetched: 6 row(s)
      hive> select acos(2);
      OK
      NaN
      Time taken: 0.437 seconds, Fetched: 1 row(s)
      
      mysql>  select acos(2);
      +---------+
      | acos(2) |
      +---------+
      |    NULL |
      +---------+
      1 row in set (0.00 sec)
      

      Attachments

        1. HIVE-17240.6.patch
          58 kB
          Yuming Wang
        2. HIVE-17240.5.patch
          58 kB
          Yuming Wang
        3. HIVE-17240.4.patch
          47 kB
          Yuming Wang
        4. HIVE-17240.3.patch
          13 kB
          Yuming Wang
        5. HIVE-17240.2.patch
          3 kB
          Yuming Wang
        6. HIVE-17240.1.patch
          1 kB
          Yuming Wang

        Issue Links

          Activity

            People

              yumwang Yuming Wang
              yumwang Yuming Wang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: