Details

    • Type: Improvement Improvement
    • Status: Reviewable
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.5.0
    • Fix Version/s: Future
    • Component/s: None
    • Labels:
      None

      Description

      Add genericUDF/reflectUDF that will allow users to use methods from Java directly, instead having to write a UDF wrapper on top of existing Java method.
      Usage:

      SELECT reflect("java.lang.String", "valueOf", 1),
             reflect("java.lang.String", "isEmpty"),
             reflect("java.lang.Math", "max", 2, 3),
             reflect("java.lang.Math", "min", 2, 3),
             reflect("java.lang.Math", "round", 2.5),
             reflect("java.lang.Math", "exp", 1.0),
             reflect("java.lang.Math", "floor", 1.9)
      FROM src LIMIT 1;
      
      1   true    3   2   3   2.7182818284590455  1.0
      
      1. DRILL-345.patch
        8 kB
        Sudheesh Katkam

        Activity

        Hide
        Sudheesh Katkam added a comment -

        Submitting patch. Works for any java.lang.Math function whose parameter(s) and return value types are same.

        Show
        Sudheesh Katkam added a comment - Submitting patch. Works for any java.lang.Math function whose parameter(s) and return value types are same.

          People

          • Assignee:
            Mehant Baid
            Reporter:
            Yash Sharma
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development