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

UDF translate doesn't take either CHAR or VARCHAR as any of its arguments

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

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.12.0
    • 0.14.0
    • UDF
    • None

    Description

      UDF translate(input, from, to) doesn't accept any CHAR or VARCHAR typed argument.

      hive> desc vc;
      c                   	char(5)             	None                
      vc                  	varchar(7)          	None                
      s                   	string              	None                
      hive> select translate("my input", c, "ll") from vc;
      FAILED: SemanticException [Error 10016]: Line 1:29 Argument type mismatch 'c': A string argument was expected but an argument of type char(5) was given.
      

      However, if the type is String, then the UDF works fine.

      Attachments

        1. HIVE-6622.1.patch
          3 kB
          Wilbur Yang

        Activity

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

          People

            wilbur.yang Wilbur Yang Assign to me
            xuefuz Xuefu Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment