Apache Drill
  1. Apache Drill
  2. DRILL-247

New Math Functions: log, sqrt, cbrt, rand, round, exp, e, pi, pow

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.0.0-rc1
    • 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.patch
        11 kB
        Yash Sharma
      2. DRILL-247.patch
        18 kB
        Yash Sharma

        Activity

        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:
            Unassigned
            Reporter:
            Yash Sharma
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development