Skip to content

[SPARK-8207][SQL] Add math function bin #6721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 16 commits into from
Closed

Conversation

viirya
Copy link
Member

@viirya viirya commented Jun 9, 2015

@SparkQA
Copy link

SparkQA commented Jun 9, 2015

Test build #34500 has finished for PR 6721 at commit 50e0c3b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • abstract class AbstractUnaryMathExpression[T, U](name: String)
    • abstract class UnaryMathExpression(f: Double => Double, name: String)
    • case class Bin(child: Expression)

@SparkQA
Copy link

SparkQA commented Jun 9, 2015

Test build #34507 has finished for PR 6721 at commit c0c3197.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • abstract class AbstractUnaryMathExpression[T, U](name: String)
    • abstract class UnaryMathExpression(f: Double => Double, name: String)
    • case class Bin(child: Expression)

@@ -1299,6 +1299,21 @@ object functions {
*/
def toRadians(columnName: String): Column = toRadians(Column(columnName))

/**
* Computes the binary format of the given value.
Copy link
Contributor

Choose a reason for hiding this comment

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

An expression that returns the string representation of the binary value of the given long column.
For example, bin("123") returns "1100".

@SparkQA
Copy link

SparkQA commented Jun 10, 2015

Test build #34583 has finished for PR 6721 at commit 4cb764d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class OverrideFunctionRegistry(underlying: FunctionRegistry) extends FunctionRegistry
    • abstract class AbstractUnaryMathExpression[T, U](name: String)
    • abstract class UnaryMathExpression(f: Double => Double, name: String)
    • case class Bin(child: Expression)

* @group math_funcs
* @since 1.4.0
*/
def bin(e: Column): Column = Bin(e.expr)
Copy link
Contributor

Choose a reason for hiding this comment

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

the math functions are sorted. can we put this in order as well?

Conflicts:
	sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/MathFunctionsSuite.scala
	sql/core/src/main/scala/org/apache/spark/sql/functions.scala
	sql/core/src/test/scala/org/apache/spark/sql/DataFrameFunctionsSuite.scala
@SparkQA
Copy link

SparkQA commented Jun 11, 2015

Test build #34676 has finished for PR 6721 at commit a0a2d0f.

  • This patch fails Python style tests.
  • This patch does not merge cleanly.
  • This patch adds the following public classes (experimental):
    • abstract class AbstractUnaryMathExpression[T, U](name: String)
    • abstract class UnaryMathExpression(f: Double => Double, name: String)
    • case class Bin(child: Expression)

@SparkQA
Copy link

SparkQA commented Jun 11, 2015

Test build #34677 has finished for PR 6721 at commit 7a0196f.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • abstract class LeafMathExpression(c: Double, name: String)
    • abstract class AbstractUnaryMathExpression[T, U](name: String)
    • abstract class UnaryMathExpression(f: Double => Double, name: String)
    • case class EulerNumber() extends LeafMathExpression(math.E, "E")
    • case class Pi() extends LeafMathExpression(math.Pi, "PI")
    • case class Log2(child: Expression)
    • case class Bin(child: Expression)
    • case class StringLength(child: Expression) extends UnaryExpression with ExpectsInputTypes

@viirya
Copy link
Member Author

viirya commented Jun 11, 2015

retest this please.

@SparkQA
Copy link

SparkQA commented Jun 11, 2015

Test build #34688 has finished for PR 6721 at commit 7a0196f.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • abstract class AbstractUnaryMathExpression[T, U](name: String)
    • abstract class UnaryMathExpression(f: Double => Double, name: String)
    • case class Bin(child: Expression)

@SparkQA
Copy link

SparkQA commented Jun 11, 2015

Test build #34698 has finished for PR 6721 at commit d4f4774.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • abstract class AbstractUnaryMathExpression[T, U](name: String)
    • abstract class UnaryMathExpression(f: Double => Double, name: String)
    • case class Bin(child: Expression)

Conflicts:
	sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/math.scala
	sql/core/src/test/scala/org/apache/spark/sql/DataFrameFunctionsSuite.scala
@SparkQA
Copy link

SparkQA commented Jun 13, 2015

Test build #34823 has finished for PR 6721 at commit dea9c12.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • abstract class AbstractUnaryMathExpression[T, U](name: String)
    • abstract class UnaryMathExpression(f: Double => Double, name: String)
    • case class Bin(child: Expression)

Conflicts:
	sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/math.scala
@SparkQA
Copy link

SparkQA commented Jun 15, 2015

Test build #34914 has finished for PR 6721 at commit 0cf20f2.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • abstract class AbstractUnaryMathExpression[T, U](name: String)
    • abstract class UnaryMathExpression(f: Double => Double, name: String)
    • case class Bin(child: Expression)

@@ -230,6 +231,19 @@ def approxCountDistinct(col, rsd=None):
return Column(jc)


@ignore_unicode_prefix
@since(1.4)
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be 1.5.

@SparkQA
Copy link

SparkQA commented Jun 18, 2015

Test build #35098 has finished for PR 6721 at commit 0677f1a.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class ElementwiseProduct(VectorTransformer):
    • class MatrixUDT(UserDefinedType):
    • abstract class AbstractUnaryMathExpression[T, U](name: String)
    • abstract class UnaryMathExpression(f: Double => Double, name: String)
    • case class Bin(child: Expression)
    • // Add jar to isolated hive (metadataHive) class loader.

@SparkQA
Copy link

SparkQA commented Jun 18, 2015

Test build #35105 has finished for PR 6721 at commit 07e1c8f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Bin(child: Expression)

override def expectedChildTypes: Seq[DataType] = Seq(LongType)
override def dataType: DataType = StringType

def funcName: String = name.toLowerCase
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not needed, I think.

@davies
Copy link
Contributor

davies commented Jun 19, 2015

LGTM, merging into master!

@asfgit asfgit closed this in 2c59d5c Jun 19, 2015
@SparkQA
Copy link

SparkQA commented Jun 19, 2015

Test build #35287 has finished for PR 6721 at commit cde33b5.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Bin(child: Expression)

@viirya
Copy link
Member Author

viirya commented Jun 19, 2015

Looks like an unrelated failure. Do we need to retest this?

@viirya viirya deleted the expr_bin branch December 27, 2023 18:17
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.

4 participants