Skip to content

Conversation

@brkyvz
Copy link
Contributor

@brkyvz brkyvz commented Apr 28, 2015

Adds support for the math functions for DataFrames in PySpark.

@rxin I love Davies.

@rxin
Copy link
Contributor

rxin commented Apr 28, 2015

cc @davies here's somebody that loves you

@SparkQA
Copy link

SparkQA commented Apr 28, 2015

Test build #31153 has finished for PR 5750 at commit 3ee0c05.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Hypot(
    • case class Pow(left: Expression, right: Expression) extends BinaryMathExpression(math.pow, "POWER")
    • abstract class MathematicalExpression(f: Double => Double, name: String)
    • case class Acos(child: Expression) extends MathematicalExpression(math.acos, "ACOS")
    • case class Asin(child: Expression) extends MathematicalExpression(math.asin, "ASIN")
    • case class Atan(child: Expression) extends MathematicalExpression(math.atan, "ATAN")
    • case class Cbrt(child: Expression) extends MathematicalExpression(math.cbrt, "CBRT")
    • case class Ceil(child: Expression) extends MathematicalExpression(math.ceil, "CEIL")
    • case class Cos(child: Expression) extends MathematicalExpression(math.cos, "COS")
    • case class Cosh(child: Expression) extends MathematicalExpression(math.cosh, "COSH")
    • case class Exp(child: Expression) extends MathematicalExpression(math.exp, "EXP")
    • case class Expm1(child: Expression) extends MathematicalExpression(math.expm1, "EXPM1")
    • case class Floor(child: Expression) extends MathematicalExpression(math.floor, "FLOOR")
    • case class Log(child: Expression) extends MathematicalExpression(math.log, "LOG")
    • case class Log10(child: Expression) extends MathematicalExpression(math.log10, "LOG10")
    • case class Log1p(child: Expression) extends MathematicalExpression(math.log1p, "LOG1P")
    • case class Rint(child: Expression) extends MathematicalExpression(math.rint, "ROUND")
    • case class Signum(child: Expression) extends MathematicalExpression(math.signum, "SIGNUM")
    • case class Sin(child: Expression) extends MathematicalExpression(math.sin, "SIN")
    • case class Sinh(child: Expression) extends MathematicalExpression(math.sinh, "SINH")
    • case class Tan(child: Expression) extends MathematicalExpression(math.tan, "TAN")
    • case class Tanh(child: Expression) extends MathematicalExpression(math.tanh, "TANH")
  • This patch does not change any dependencies.

@SparkQA
Copy link

SparkQA commented Apr 28, 2015

Test build #31156 has finished for PR 5750 at commit 33c2c15.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • trait HasElasticNetParam extends Params
    • trait HasTol extends Params
    • case class Hypot(
    • case class Pow(left: Expression, right: Expression) extends BinaryMathExpression(math.pow, "POWER")
    • abstract class MathematicalExpression(f: Double => Double, name: String)
    • case class Acos(child: Expression) extends MathematicalExpression(math.acos, "ACOS")
    • case class Asin(child: Expression) extends MathematicalExpression(math.asin, "ASIN")
    • case class Atan(child: Expression) extends MathematicalExpression(math.atan, "ATAN")
    • case class Cbrt(child: Expression) extends MathematicalExpression(math.cbrt, "CBRT")
    • case class Ceil(child: Expression) extends MathematicalExpression(math.ceil, "CEIL")
    • case class Cos(child: Expression) extends MathematicalExpression(math.cos, "COS")
    • case class Cosh(child: Expression) extends MathematicalExpression(math.cosh, "COSH")
    • case class Exp(child: Expression) extends MathematicalExpression(math.exp, "EXP")
    • case class Expm1(child: Expression) extends MathematicalExpression(math.expm1, "EXPM1")
    • case class Floor(child: Expression) extends MathematicalExpression(math.floor, "FLOOR")
    • case class Log(child: Expression) extends MathematicalExpression(math.log, "LOG")
    • case class Log10(child: Expression) extends MathematicalExpression(math.log10, "LOG10")
    • case class Log1p(child: Expression) extends MathematicalExpression(math.log1p, "LOG1P")
    • case class Rint(child: Expression) extends MathematicalExpression(math.rint, "ROUND")
    • case class Signum(child: Expression) extends MathematicalExpression(math.signum, "SIGNUM")
    • case class Sin(child: Expression) extends MathematicalExpression(math.sin, "SIN")
    • case class Sinh(child: Expression) extends MathematicalExpression(math.sinh, "SINH")
    • case class Tan(child: Expression) extends MathematicalExpression(math.tan, "TAN")
    • case class Tanh(child: Expression) extends MathematicalExpression(math.tanh, "TANH")
  • This patch does not change any dependencies.

@SparkQA
Copy link

SparkQA commented Apr 28, 2015

Test build #31168 has finished for PR 5750 at commit 7b7d7c4.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Hypot(
    • case class Pow(left: Expression, right: Expression) extends BinaryMathExpression(math.pow, "POWER")
    • abstract class MathematicalExpression(f: Double => Double, name: String)
    • case class Acos(child: Expression) extends MathematicalExpression(math.acos, "ACOS")
    • case class Asin(child: Expression) extends MathematicalExpression(math.asin, "ASIN")
    • case class Atan(child: Expression) extends MathematicalExpression(math.atan, "ATAN")
    • case class Cbrt(child: Expression) extends MathematicalExpression(math.cbrt, "CBRT")
    • case class Ceil(child: Expression) extends MathematicalExpression(math.ceil, "CEIL")
    • case class Cos(child: Expression) extends MathematicalExpression(math.cos, "COS")
    • case class Cosh(child: Expression) extends MathematicalExpression(math.cosh, "COSH")
    • case class Exp(child: Expression) extends MathematicalExpression(math.exp, "EXP")
    • case class Expm1(child: Expression) extends MathematicalExpression(math.expm1, "EXPM1")
    • case class Floor(child: Expression) extends MathematicalExpression(math.floor, "FLOOR")
    • case class Log(child: Expression) extends MathematicalExpression(math.log, "LOG")
    • case class Log10(child: Expression) extends MathematicalExpression(math.log10, "LOG10")
    • case class Log1p(child: Expression) extends MathematicalExpression(math.log1p, "LOG1P")
    • case class Rint(child: Expression) extends MathematicalExpression(math.rint, "ROUND")
    • case class Signum(child: Expression) extends MathematicalExpression(math.signum, "SIGNUM")
    • case class Sin(child: Expression) extends MathematicalExpression(math.sin, "SIN")
    • case class Sinh(child: Expression) extends MathematicalExpression(math.sinh, "SINH")
    • case class Tan(child: Expression) extends MathematicalExpression(math.tan, "TAN")
    • case class Tanh(child: Expression) extends MathematicalExpression(math.tanh, "TANH")
  • This patch does not change any dependencies.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about changing is_math to "jvm_class" ?

and then remove _function_obj, and just pass sc._jvm.functions or sc._jvm.mathfunctions in.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually we should probably make this a parallel thing, i.e. mathfunctions?

@SparkQA
Copy link

SparkQA commented Apr 29, 2015

Test build #31238 has finished for PR 5750 at commit 25e6534.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Hypot(
    • case class Pow(left: Expression, right: Expression) extends BinaryMathExpression(math.pow, "POWER")
    • abstract class MathematicalExpression(f: Double => Double, name: String)
    • case class Acos(child: Expression) extends MathematicalExpression(math.acos, "ACOS")
    • case class Asin(child: Expression) extends MathematicalExpression(math.asin, "ASIN")
    • case class Atan(child: Expression) extends MathematicalExpression(math.atan, "ATAN")
    • case class Cbrt(child: Expression) extends MathematicalExpression(math.cbrt, "CBRT")
    • case class Ceil(child: Expression) extends MathematicalExpression(math.ceil, "CEIL")
    • case class Cos(child: Expression) extends MathematicalExpression(math.cos, "COS")
    • case class Cosh(child: Expression) extends MathematicalExpression(math.cosh, "COSH")
    • case class Exp(child: Expression) extends MathematicalExpression(math.exp, "EXP")
    • case class Expm1(child: Expression) extends MathematicalExpression(math.expm1, "EXPM1")
    • case class Floor(child: Expression) extends MathematicalExpression(math.floor, "FLOOR")
    • case class Log(child: Expression) extends MathematicalExpression(math.log, "LOG")
    • case class Log10(child: Expression) extends MathematicalExpression(math.log10, "LOG10")
    • case class Log1p(child: Expression) extends MathematicalExpression(math.log1p, "LOG1P")
    • case class Rint(child: Expression) extends MathematicalExpression(math.rint, "ROUND")
    • case class Signum(child: Expression) extends MathematicalExpression(math.signum, "SIGNUM")
    • case class Sin(child: Expression) extends MathematicalExpression(math.sin, "SIN")
    • case class Sinh(child: Expression) extends MathematicalExpression(math.sinh, "SINH")
    • case class Tan(child: Expression) extends MathematicalExpression(math.tan, "TAN")
    • case class Tanh(child: Expression) extends MathematicalExpression(math.tanh, "TANH")
  • This patch does not change any dependencies.

@SparkQA
Copy link

SparkQA commented Apr 29, 2015

Test build #31208 has finished for PR 5750 at commit d3f7e0f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Hypot(
    • case class Pow(left: Expression, right: Expression) extends BinaryMathExpression(math.pow, "POWER")
    • abstract class MathematicalExpression(f: Double => Double, name: String)
    • case class Acos(child: Expression) extends MathematicalExpression(math.acos, "ACOS")
    • case class Asin(child: Expression) extends MathematicalExpression(math.asin, "ASIN")
    • case class Atan(child: Expression) extends MathematicalExpression(math.atan, "ATAN")
    • case class Cbrt(child: Expression) extends MathematicalExpression(math.cbrt, "CBRT")
    • case class Ceil(child: Expression) extends MathematicalExpression(math.ceil, "CEIL")
    • case class Cos(child: Expression) extends MathematicalExpression(math.cos, "COS")
    • case class Cosh(child: Expression) extends MathematicalExpression(math.cosh, "COSH")
    • case class Exp(child: Expression) extends MathematicalExpression(math.exp, "EXP")
    • case class Expm1(child: Expression) extends MathematicalExpression(math.expm1, "EXPM1")
    • case class Floor(child: Expression) extends MathematicalExpression(math.floor, "FLOOR")
    • case class Log(child: Expression) extends MathematicalExpression(math.log, "LOG")
    • case class Log10(child: Expression) extends MathematicalExpression(math.log10, "LOG10")
    • case class Log1p(child: Expression) extends MathematicalExpression(math.log1p, "LOG1P")
    • case class Rint(child: Expression) extends MathematicalExpression(math.rint, "ROUND")
    • case class Signum(child: Expression) extends MathematicalExpression(math.signum, "SIGNUM")
    • case class Sin(child: Expression) extends MathematicalExpression(math.sin, "SIN")
    • case class Sinh(child: Expression) extends MathematicalExpression(math.sinh, "SINH")
    • case class Tan(child: Expression) extends MathematicalExpression(math.tan, "TAN")
    • case class Tanh(child: Expression) extends MathematicalExpression(math.tanh, "TANH")
  • This patch does not change any dependencies.

@brkyvz
Copy link
Contributor Author

brkyvz commented Apr 29, 2015

retest this please

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

u can now remove is_math

@rxin
Copy link
Contributor

rxin commented Apr 29, 2015

LGTM. Let's hope Jenkins pass.

@brkyvz
Copy link
Contributor Author

brkyvz commented Apr 29, 2015

retest this please

@SparkQA
Copy link

SparkQA commented Apr 29, 2015

Test build #31240 has finished for PR 5750 at commit 25e6534.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Hypot(
    • case class Pow(left: Expression, right: Expression) extends BinaryMathExpression(math.pow, "POWER")
    • abstract class MathematicalExpression(f: Double => Double, name: String)
    • case class Acos(child: Expression) extends MathematicalExpression(math.acos, "ACOS")
    • case class Asin(child: Expression) extends MathematicalExpression(math.asin, "ASIN")
    • case class Atan(child: Expression) extends MathematicalExpression(math.atan, "ATAN")
    • case class Cbrt(child: Expression) extends MathematicalExpression(math.cbrt, "CBRT")
    • case class Ceil(child: Expression) extends MathematicalExpression(math.ceil, "CEIL")
    • case class Cos(child: Expression) extends MathematicalExpression(math.cos, "COS")
    • case class Cosh(child: Expression) extends MathematicalExpression(math.cosh, "COSH")
    • case class Exp(child: Expression) extends MathematicalExpression(math.exp, "EXP")
    • case class Expm1(child: Expression) extends MathematicalExpression(math.expm1, "EXPM1")
    • case class Floor(child: Expression) extends MathematicalExpression(math.floor, "FLOOR")
    • case class Log(child: Expression) extends MathematicalExpression(math.log, "LOG")
    • case class Log10(child: Expression) extends MathematicalExpression(math.log10, "LOG10")
    • case class Log1p(child: Expression) extends MathematicalExpression(math.log1p, "LOG1P")
    • case class Rint(child: Expression) extends MathematicalExpression(math.rint, "ROUND")
    • case class Signum(child: Expression) extends MathematicalExpression(math.signum, "SIGNUM")
    • case class Sin(child: Expression) extends MathematicalExpression(math.sin, "SIN")
    • case class Sinh(child: Expression) extends MathematicalExpression(math.sinh, "SINH")
    • case class Tan(child: Expression) extends MathematicalExpression(math.tan, "TAN")
    • case class Tanh(child: Expression) extends MathematicalExpression(math.tanh, "TANH")
  • This patch does not change any dependencies.

@SparkQA
Copy link

SparkQA commented Apr 29, 2015

Test build #31242 has finished for PR 5750 at commit 7c4f563.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Hypot(
    • case class Pow(left: Expression, right: Expression) extends BinaryMathExpression(math.pow, "POWER")
    • abstract class MathematicalExpression(f: Double => Double, name: String)
    • case class Acos(child: Expression) extends MathematicalExpression(math.acos, "ACOS")
    • case class Asin(child: Expression) extends MathematicalExpression(math.asin, "ASIN")
    • case class Atan(child: Expression) extends MathematicalExpression(math.atan, "ATAN")
    • case class Cbrt(child: Expression) extends MathematicalExpression(math.cbrt, "CBRT")
    • case class Ceil(child: Expression) extends MathematicalExpression(math.ceil, "CEIL")
    • case class Cos(child: Expression) extends MathematicalExpression(math.cos, "COS")
    • case class Cosh(child: Expression) extends MathematicalExpression(math.cosh, "COSH")
    • case class Exp(child: Expression) extends MathematicalExpression(math.exp, "EXP")
    • case class Expm1(child: Expression) extends MathematicalExpression(math.expm1, "EXPM1")
    • case class Floor(child: Expression) extends MathematicalExpression(math.floor, "FLOOR")
    • case class Log(child: Expression) extends MathematicalExpression(math.log, "LOG")
    • case class Log10(child: Expression) extends MathematicalExpression(math.log10, "LOG10")
    • case class Log1p(child: Expression) extends MathematicalExpression(math.log1p, "LOG1P")
    • case class Rint(child: Expression) extends MathematicalExpression(math.rint, "ROUND")
    • case class Signum(child: Expression) extends MathematicalExpression(math.signum, "SIGNUM")
    • case class Sin(child: Expression) extends MathematicalExpression(math.sin, "SIN")
    • case class Sinh(child: Expression) extends MathematicalExpression(math.sinh, "SINH")
    • case class Tan(child: Expression) extends MathematicalExpression(math.tan, "TAN")
    • case class Tanh(child: Expression) extends MathematicalExpression(math.tanh, "TANH")
  • This patch does not change any dependencies.

@rxin
Copy link
Contributor

rxin commented Apr 29, 2015

Thanks. Merging this in master.

@asfgit asfgit closed this in fe917f5 Apr 29, 2015
@SparkQA
Copy link

SparkQA commented Apr 29, 2015

Test build #31243 has finished for PR 5750 at commit 7c4f563.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Hypot(
    • case class Pow(left: Expression, right: Expression) extends BinaryMathExpression(math.pow, "POWER")
    • abstract class MathematicalExpression(f: Double => Double, name: String)
    • case class Acos(child: Expression) extends MathematicalExpression(math.acos, "ACOS")
    • case class Asin(child: Expression) extends MathematicalExpression(math.asin, "ASIN")
    • case class Atan(child: Expression) extends MathematicalExpression(math.atan, "ATAN")
    • case class Cbrt(child: Expression) extends MathematicalExpression(math.cbrt, "CBRT")
    • case class Ceil(child: Expression) extends MathematicalExpression(math.ceil, "CEIL")
    • case class Cos(child: Expression) extends MathematicalExpression(math.cos, "COS")
    • case class Cosh(child: Expression) extends MathematicalExpression(math.cosh, "COSH")
    • case class Exp(child: Expression) extends MathematicalExpression(math.exp, "EXP")
    • case class Expm1(child: Expression) extends MathematicalExpression(math.expm1, "EXPM1")
    • case class Floor(child: Expression) extends MathematicalExpression(math.floor, "FLOOR")
    • case class Log(child: Expression) extends MathematicalExpression(math.log, "LOG")
    • case class Log10(child: Expression) extends MathematicalExpression(math.log10, "LOG10")
    • case class Log1p(child: Expression) extends MathematicalExpression(math.log1p, "LOG1P")
    • case class Rint(child: Expression) extends MathematicalExpression(math.rint, "ROUND")
    • case class Signum(child: Expression) extends MathematicalExpression(math.signum, "SIGNUM")
    • case class Sin(child: Expression) extends MathematicalExpression(math.sin, "SIN")
    • case class Sinh(child: Expression) extends MathematicalExpression(math.sinh, "SINH")
    • case class Tan(child: Expression) extends MathematicalExpression(math.tan, "TAN")
    • case class Tanh(child: Expression) extends MathematicalExpression(math.tanh, "TANH")
  • This patch does not change any dependencies.

jeanlyn pushed a commit to jeanlyn/spark that referenced this pull request May 28, 2015
Adds support for the math functions for DataFrames in PySpark.

rxin I love Davies.

Author: Burak Yavuz <[email protected]>

Closes apache#5750 from brkyvz/python-math-udfs and squashes the following commits:

7c4f563 [Burak Yavuz] removed is_math
3c4adde [Burak Yavuz] cleanup imports
d5dca3f [Burak Yavuz] moved math functions to mathfunctions
25e6534 [Burak Yavuz] addressed comments v2.0
d3f7e0f [Burak Yavuz] addressed comments and added tests
7b7d7c4 [Burak Yavuz] remove tests for removed methods
33c2c15 [Burak Yavuz] fixed python style
3ee0c05 [Burak Yavuz] added python functions
jeanlyn pushed a commit to jeanlyn/spark that referenced this pull request Jun 12, 2015
Adds support for the math functions for DataFrames in PySpark.

rxin I love Davies.

Author: Burak Yavuz <[email protected]>

Closes apache#5750 from brkyvz/python-math-udfs and squashes the following commits:

7c4f563 [Burak Yavuz] removed is_math
3c4adde [Burak Yavuz] cleanup imports
d5dca3f [Burak Yavuz] moved math functions to mathfunctions
25e6534 [Burak Yavuz] addressed comments v2.0
d3f7e0f [Burak Yavuz] addressed comments and added tests
7b7d7c4 [Burak Yavuz] remove tests for removed methods
33c2c15 [Burak Yavuz] fixed python style
3ee0c05 [Burak Yavuz] added python functions
nemccarthy pushed a commit to nemccarthy/spark that referenced this pull request Jun 19, 2015
Adds support for the math functions for DataFrames in PySpark.

rxin I love Davies.

Author: Burak Yavuz <[email protected]>

Closes apache#5750 from brkyvz/python-math-udfs and squashes the following commits:

7c4f563 [Burak Yavuz] removed is_math
3c4adde [Burak Yavuz] cleanup imports
d5dca3f [Burak Yavuz] moved math functions to mathfunctions
25e6534 [Burak Yavuz] addressed comments v2.0
d3f7e0f [Burak Yavuz] addressed comments and added tests
7b7d7c4 [Burak Yavuz] remove tests for removed methods
33c2c15 [Burak Yavuz] fixed python style
3ee0c05 [Burak Yavuz] added python functions
@brkyvz brkyvz deleted the python-math-udfs branch February 3, 2019 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants