-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[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
Conversation
Test build #34500 has finished for PR 6721 at commit
|
Test build #34507 has finished for PR 6721 at commit
|
@@ -1299,6 +1299,21 @@ object functions { | |||
*/ | |||
def toRadians(columnName: String): Column = toRadians(Column(columnName)) | |||
|
|||
/** | |||
* Computes the binary format of the given value. |
There was a problem hiding this comment.
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".
Test build #34583 has finished for PR 6721 at commit
|
* @group math_funcs | ||
* @since 1.4.0 | ||
*/ | ||
def bin(e: Column): Column = Bin(e.expr) |
There was a problem hiding this comment.
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
Test build #34676 has finished for PR 6721 at commit
|
Test build #34677 has finished for PR 6721 at commit
|
retest this please. |
Test build #34688 has finished for PR 6721 at commit
|
Test build #34698 has finished for PR 6721 at commit
|
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
Test build #34823 has finished for PR 6721 at commit
|
Conflicts: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/math.scala
Test build #34914 has finished for PR 6721 at commit
|
@@ -230,6 +231,19 @@ def approxCountDistinct(col, rsd=None): | |||
return Column(jc) | |||
|
|||
|
|||
@ignore_unicode_prefix | |||
@since(1.4) |
There was a problem hiding this comment.
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.
Test build #35098 has finished for PR 6721 at commit
|
Test build #35105 has finished for PR 6721 at commit
|
override def expectedChildTypes: Seq[DataType] = Seq(LongType) | ||
override def dataType: DataType = StringType | ||
|
||
def funcName: String = name.toLowerCase |
There was a problem hiding this comment.
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.
LGTM, merging into master! |
Test build #35287 has finished for PR 6721 at commit
|
Looks like an unrelated failure. Do we need to retest this? |
JIRA: https://issues.apache.org/jira/browse/SPARK-8207