Skip to content

Commit 0677f1a

Browse files
committed
For comments.
1 parent cf62b95 commit 0677f1a

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

python/pyspark/sql/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def approxCountDistinct(col, rsd=None):
232232

233233

234234
@ignore_unicode_prefix
235-
@since(1.4)
235+
@since(1.5)
236236
def bin(col):
237237
"""Returns the string representation of the binary value of the given column.
238238

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/math.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ case class Bin(child: Expression)
234234

235235
override def genCode(ctx: CodeGenContext, ev: GeneratedExpressionCode): String = {
236236
defineCodeGen(ctx, ev, (c) =>
237-
s"org.apache.spark.unsafe.types.UTF8String.fromString(java.lang.Long.toBinaryString($c))")
237+
s"${ctx.stringType}.fromString(java.lang.Long.toBinaryString($c))")
238238
}
239239
}
240240

sql/core/src/main/scala/org/apache/spark/sql/functions.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ object functions {
886886
* column. For example, bin("12") returns "1100".
887887
*
888888
* @group math_funcs
889-
* @since 1.4.0
889+
* @since 1.5.0
890890
*/
891891
def bin(e: Column): Column = Bin(e.expr)
892892

@@ -895,7 +895,7 @@ object functions {
895895
* column. For example, bin("12") returns "1100".
896896
*
897897
* @group math_funcs
898-
* @since 1.4.0
898+
* @since 1.5.0
899899
*/
900900
def bin(columnName: String): Column = bin(Column(columnName))
901901

sql/core/src/test/scala/org/apache/spark/sql/DataFrameFunctionsSuite.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
package org.apache.spark.sql
1919

20-
import java.lang.{Long => JLong}
21-
2220
import org.apache.spark.sql.TestData._
2321
import org.apache.spark.sql.functions._
2422
import org.apache.spark.sql.types._

0 commit comments

Comments
 (0)