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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.12.0
    • 0.14.0
    • UDF
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: