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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: