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

Add reflect() UDF for reflective invocation of Java methods

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.7.0
    • 0.7.0
    • UDF
    • None
    • Reviewed

    Description

      There are many methods in java that are static and have no arguments or can be invoked with one simple parameter. More complicated functions will require a UDF but one generic one can work as a poor-mans UDF.

      SELECT reflect("java.lang.String", "valueOf", 1), reflect("java.lang.String", "isEmpty")
      FROM src LIMIT 1;
      

      Attachments

        1. HIVE-471.1.patch
          16 kB
          Zheng Shao
        2. HIVE-471.2.patch
          16 kB
          Zheng Shao
        3. HIVE-471.3.patch
          17 kB
          Edward Capriolo
        4. HIVE-471.4.patch
          18 kB
          Edward Capriolo
        5. HIVE-471.5.patch
          18 kB
          Edward Capriolo
        6. HIVE-471.6.patch.txt
          23 kB
          Edward Capriolo
        7. hive-471.diff
          4 kB
          Edward Capriolo
        8. hive-471-gen.diff
          6 kB
          Edward Capriolo

        Issue Links

          Activity

            People

              appodictic Edward Capriolo
              appodictic Edward Capriolo
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: