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

[GenericUDF] new string function ELT(N,str1,str2,str3,...)

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.4.0
    • 0.4.0
    • Query Processor
    • None
    • Reviewed

    Description

      ELT(N,str1,str2,str3,...)

      Returns str1 if N = 1, str2 if N = 2, and so on. Returns NULL if N is less than 1 or greater than the number of arguments. ELT() is the complement of FIELD().

      mysql> SELECT ELT(1, 'ej', 'Heja', 'hej', 'foo');
              -> 'ej'
      mysql> SELECT ELT(4, 'ej', 'Heja', 'hej', 'foo');
              -> 'foo'
      

      Attachments

        1. HIVE-512.patch
          5 kB
          Min Zhou
        2. HIVE-512.2.patch
          11 kB
          Min Zhou

        Issue Links

          Activity

            People

              coderplay Min Zhou
              coderplay Min Zhou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: