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

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

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.4.0
    • Fix Version/s: 0.4.0
    • Component/s: Query Processor
    • Labels:
      None
    • Hadoop Flags:
      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.2.patch
          11 kB
          Min Zhou
        2. HIVE-512.patch
          5 kB
          Min Zhou

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: