Hive
  1. Hive
  2. HIVE-6622

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.12.0
    • Fix Version/s: 0.14.0
    • Component/s: UDF
    • Labels:
      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.

        Activity

        Xuefu Zhang created issue -
        Wilbur Yang made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Wilbur Yang made changes -
        Attachment HIVE-6622.1.patch [ 12651332 ]
        Xuefu Zhang made changes -
        Assignee Xuefu Zhang [ xuefuz ]
        Ashutosh Chauhan made changes -
        Assignee Wilbur Yang [ wilbur.yang ]
        Xuefu Zhang made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 0.14.0 [ 12326450 ]
        Resolution Fixed [ 1 ]
        Lefty Leverenz made changes -
        Labels TODOC14
        Szehon Ho made changes -
        Labels TODOC14
        Thejas M Nair made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Wilbur Yang
            Reporter:
            Xuefu Zhang
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development