Skip to content

Commit

Permalink
fix code style.etc
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoPhilipse committed Jun 9, 2020
1 parent b43a140 commit 1d5c750
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/pyspark/sql/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ def timestamp_seconds(col):
>>> from pyspark.sql.functions import timestamp_seconds
>>> time_df = spark.createDataFrame([(1230219000,)], ['unix_time'])
>>> time_df.select(timestamp_seconds(time_df.unix_time).alias('ts')).collect()
[Row(ts=datetime.datetime(2008, 12, 25, 07, 30))]
[Row(ts=datetime.datetime(2008, 12, 25, 7, 30))]
"""

sc = SparkContext._active_spark_context
Expand Down
6 changes: 2 additions & 4 deletions sql/core/src/main/scala/org/apache/spark/sql/functions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3363,10 +3363,8 @@ object functions {
* @group = "datetime_funcs",
* @since = "3.1.0")
*/
def timestamp_seconds(e: Column): Column = withExpr { SecondsToTimestamp(e.expr) }

def array_contains1(column: Column, value: Any): Column = withExpr {
ArrayContains(column.expr, lit(value).expr)
def timestamp_seconds(e: Column): Column = withExpr {
SecondsToTimestamp(e.expr)
}

//////////////////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 1d5c750

Please sign in to comment.