Hive
  1. Hive
  2. HIVE-1027

Create UDFs for XPath expression evaluation

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.6.0
    • Component/s: Query Processor
    • Labels:
      None

      Description

      Create UDFs for evaluating XPath expressions against XML documents.

      Examples:

      > SELECT xpath_double ('<a><b class="odd">1</b><b class="even">2</b><b class="odd">4</b><c>8</c></a>', 'sum(a/b[@class="odd"])') FROM src LIMIT 1 ;
      5.0
      > SELECT xpath_string ('<a><b>b1</b><b>b2</b></a>', 'a/b[2]') FROM src LIMIT 1 ;
      b2
      > SELECT xpath ('<a><b>b1</b><b>b2</b><b>b3</b><c>c1</c><c>c2</c></a>', 'a/c/text()') FROM src LIMIT 1 ;
      ["c1","c2"]

      Included functions are: xpath_short, xpath_int, xpath_long, xpath_float, xpath_double/xpath_number, xpath_string, xpath

      1. HIVE-1027_3.patch
        80 kB
        Ning Zhang
      2. hive-1027-v3.patch
        78 kB
        Patrick Angeles
      3. hive-1027-v2.patch
        83 kB
        Patrick Angeles
      4. hive-1027.patch
        74 kB
        Patrick Angeles
      5. udf_xpath.patch
        69 kB
        Patrick Angeles

        Activity

          People

          • Assignee:
            Patrick Angeles
            Reporter:
            Patrick Angeles
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development