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

UDF printf doesn't take either CHAR or VARCHAR as the first argument

    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

      hive> desc vc;
      OK
      c                   	char(5)             	None                
      vc                  	varchar(7)          	None                
      s                   	string              	None                
      
      hive> select printf(c) from vc;
      FAILED: SemanticException [Error 10016]: Line 1:14 Argument type mismatch 'c': Argument 1 of function PRINTF must be "string", but "char(5)" was found.
      

      However, if the argument is string type, the query runs successfully.

        Attachments

        1. HIVE-6620.patch
          7 kB
          Xuefu Zhang
        2. HIVE-6620.patch
          7 kB
          Xuefu Zhang
        3. HIVE-6620.patch
          7 kB
          Xuefu Zhang
        4. HIVE-6620.1.patch
          13 kB
          Xuefu Zhang

          Activity

            People

            • Assignee:
              xuefuz Xuefu Zhang
              Reporter:
              xuefuz Xuefu Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: