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: 1.0.0-BETA1
    • 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.patch
        14 kB
        Yash Sharma
      2. DRILL-247.patch
        11 kB
        Yash Sharma
      3. DRILL-247.patch
        18 kB
        Yash Sharma
      4. DRILL-247-rebased.patch
        14 kB
        Yash Sharma

        Activity

        Yash Sharma created issue -
        Yash Sharma made changes -
        Field Original Value New Value
        Description Improving the math functions collection with more functions:

        log: the natural logarithm (base e) of an expression
        log10: base 10 logarithm
        sqrt: square root
        cbrt: 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
        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
        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.
        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
        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/
        Yash Sharma made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Labels patch
        Yash Sharma made changes -
        Attachment DRILL-247.patch [ 12604766 ]
        Yash Sharma made changes -
        Fix Version/s M2 [ 12324963 ]
        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.
        Jacques Nadeau made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        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/
        Yash Sharma made changes -
        Attachment DRILL-247.patch [ 12640820 ]
        Jake Farrell made changes -
        Workflow no-reopen-closed, patch-avail [ 12816921 ] no-reopen-closed, patch-avail, testing [ 12860198 ]
        Yash Sharma made changes -
        Summary New Math Functions: log, sqrt, cbrt, rand, round, exp, e, pi, pow Math Functions: rand, cbrt, exp, log(a), log(a,base), pi, degrees, radians
        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/
        Yash Sharma made changes -
        Summary Math Functions: rand, cbrt, exp, log(a), log(a,base), pi, degrees, radians Math Functions: rand, cbrt, exp, log(a), log(base,num), pi, degrees, radians
        Hide
        Yash Sharma added a comment -

        Added Patch

        Show
        Yash Sharma added a comment - Added Patch
        Yash Sharma made changes -
        Attachment Drill-247.patch [ 12647188 ]
        Jacques Nadeau made changes -
        Assignee Yash Sharma [ yash360@gmail.com ]
        Component/s Functions - Drill [ 12322695 ]
        Mehant Baid made changes -
        Fix Version/s Future [ 12326743 ]
        Fix Version/s 1.0.0-rc1 [ 12324963 ]
        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.
        Yash Sharma made changes -
        Assignee Yash Sharma [ yash360@gmail.com ] DrillCommitter [ drillcommitter ]
        Jacques Nadeau made changes -
        Fix Version/s 1.0.0-BETA1 [ 12324963 ]
        Fix Version/s Future [ 12326743 ]
        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.
        Jacques Nadeau made changes -
        Assignee DrillCommitter [ drillcommitter ] Yash Sharma [ yash360@gmail.com ]
        Hide
        Yash Sharma added a comment -

        Attached new patch - rebased and tested.

        Show
        Yash Sharma added a comment - Attached new patch - rebased and tested.
        Yash Sharma made changes -
        Attachment DRILL-247-rebased.patch [ 12650583 ]
        Yash Sharma made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Yash Sharma made changes -
        Assignee Yash Sharma [ yash360@gmail.com ] DrillCommitter [ drillcommitter ]
        Jacques Nadeau made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Jacques Nadeau added a comment -

        merged on or before f86639c

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development