Apache Drill
  1. Apache Drill
  2. DRILL-247

Math Functions: rand, cbrt, exp, log(a), log(base,num), pi, degrees, radians

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.4.0
    • Component/s: Functions - Drill
    • Labels:

      Description

      Improving the math functions collection with more functions:

      log(a): the natural logarithm (base e) of an expression
      log10(a): base 10 logarithm
      sqrt(a): square root
      cbrt(a): cube root
      rand(): returns random number from 0-1.
      round(a)
      exp(a): exponential e^a
      e(): returns value of e
      pi(): returns value of pi
      pow(a, p): returns a^p

      1. DRILL-247-rebased.patch
        14 kB
        Yash Sharma
      2. Drill-247.patch
        14 kB
        Yash Sharma
      3. DRILL-247.patch
        11 kB
        Yash Sharma
      4. DRILL-247.patch
        18 kB
        Yash Sharma

        Activity

        Hide
        Jacques Nadeau added a comment -

        merged on or before f86639c

        Show
        Jacques Nadeau added a comment - merged on or before f86639c
        Hide
        Yash Sharma added a comment -

        Attached new patch - rebased and tested.

        Show
        Yash Sharma added a comment - Attached new patch - rebased and tested.
        Hide
        Jacques Nadeau added a comment -

        Can you rebase on latest master merge? Let's try to get this in this relase.

        Show
        Jacques Nadeau added a comment - Can you rebase on latest master merge? Let's try to get this in this relase.
        Hide
        Mehant Baid added a comment -

        Not in the list of p1 functions planned for Beta, but good to have.

        Show
        Mehant Baid added a comment - Not in the list of p1 functions planned for Beta, but good to have.
        Hide
        Yash Sharma added a comment -

        Added Patch

        Show
        Yash Sharma added a comment - Added Patch
        Hide
        Yash Sharma added a comment - - edited

        Updated reviewboard with new set of math functions:
        rand, cbrt, exp, log(a), log(base, num), pi, degrees, radians.
        https://reviews.apache.org/r/20482/

        Show
        Yash Sharma added a comment - - edited Updated reviewboard with new set of math functions: rand, cbrt, exp, log(a), log(base, num), pi, degrees, radians. https://reviews.apache.org/r/20482/
        Hide
        Yash Sharma added a comment -

        New Patch on codegen implementation of Math functions.

        https://reviews.apache.org/r/20482/

        Show
        Yash Sharma added a comment - New Patch on codegen implementation of Math functions. https://reviews.apache.org/r/20482/
        Hide
        Jacques Nadeau added a comment -

        Please rebase on latest master, complete reviews and then transition to Patch Available.

        Show
        Jacques Nadeau added a comment - Please rebase on latest master, complete reviews and then transition to Patch Available.
        Hide
        Yash Sharma added a comment -

        Adding patch for math functions.
        Review board for the same: https://reviews.apache.org/r/14311/

        Show
        Yash Sharma added a comment - Adding patch for math functions. Review board for the same: https://reviews.apache.org/r/14311/
        Hide
        Yash Sharma added a comment -

        I have compiled the list from Apache Hive and Pig math functions. All the function name are same as the functions present in Oracle and MySQL apart from CBRT. The CBRT() function is a new addition to the list (from Pig).

        Show
        Yash Sharma added a comment - I have compiled the list from Apache Hive and Pig math functions. All the function name are same as the functions present in Oracle and MySQL apart from CBRT. The CBRT() function is a new addition to the list (from Pig).
        Hide
        Ted Dunning added a comment -

        yash,

        What reference are you using for picking functions and names?

        It might be nice to find names common to, say, Oracle, Postgres and Sequel Server.

        Show
        Ted Dunning added a comment - yash, What reference are you using for picking functions and names? It might be nice to find names common to, say, Oracle, Postgres and Sequel Server.

          People

          • Assignee:
            DrillCommitter
            Reporter:
            Yash Sharma
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development