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

A few mathematic functions don't take decimal input

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.11.0, 0.12.0
    • 0.13.0
    • None
    • None
    • Wiki updated.

    Description

      A few mathematical functions, such as sin() cos(), etc. don't take decimal as argument.

      hive> show tables;
      OK
      Time taken: 0.534 seconds
      hive> create table test(d decimal(5,2));
      OK
      Time taken: 0.351 seconds
      hive> select sin(d) from test;
      FAILED: SemanticException [Error 10014]: Line 1:7 Wrong arguments 'd': No matching method for class org.apache.hadoop.hive.ql.udf.UDFSin with (decimal(5,2)). Possible choices: _FUNC_(double)  
      

      HIVE-6246 covers only sign() function. The remaining ones, including sin, cos, tan, asin, acos, atan, exp, ln, log, log10, log2, radians, and sqrt. These are non-generic UDFs.

      Attachments

        1. HIVE-6327.patch
          22 kB
          Xuefu Zhang
        2. HIVE-6327.1.patch
          22 kB
          Xuefu Zhang

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            xuefuz Xuefu Zhang Assign to me
            xuefuz Xuefu Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment