Skip to content

Commit

Permalink
Reverting some changes after code review
Browse files Browse the repository at this point in the history
  • Loading branch information
jaceklaskowski committed Jun 28, 2018
1 parent 487a467 commit 2bbc750
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 deletions sql/core/src/main/scala/org/apache/spark/sql/functions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,14 @@ object functions {
*/
def input_file_name(): Column = withExpr { InputFileName() }

/**
* Return true iff the column is NaN.
*
* @group normal_funcs
* @since 1.6.0
*/
def isnan(e: Column): Column = withExpr { IsNaN(e.expr) }

/**
* Return true iff the column is null.
*
Expand Down Expand Up @@ -1148,6 +1156,16 @@ object functions {
*/
def monotonically_increasing_id(): Column = withExpr { MonotonicallyIncreasingID() }

/**
* Returns col1 if it is not NaN, or col2 if col1 is NaN.
*
* Both inputs should be floating point columns (DoubleType or FloatType).
*
* @group normal_funcs
* @since 1.5.0
*/
def nanvl(col1: Column, col2: Column): Column = withExpr { NaNvl(col1.expr, col2.expr) }

/**
* Unary minus, i.e. negate the expression.
* {{{
Expand Down Expand Up @@ -1298,6 +1316,14 @@ object functions {
CaseWhen(Seq((condition.expr, lit(value).expr)))
}

/**
* Computes bitwise NOT (~) of a number.
*
* @group normal_funcs
* @since 1.4.0
*/
def bitwiseNOT(e: Column): Column = withExpr { BitwiseNot(e.expr) }

/**
* Parses the expression string into the column that it represents, similar to
* [[Dataset#selectExpr]].
Expand Down Expand Up @@ -1506,14 +1532,6 @@ object functions {
*/
def bin(columnName: String): Column = bin(Column(columnName))

/**
* Computes bitwise NOT (~) of a number.
*
* @group math_funcs
* @since 1.4.0
*/
def bitwiseNOT(e: Column): Column = withExpr { BitwiseNot(e.expr) }

/**
* Computes the cube-root of the given value.
*
Expand Down Expand Up @@ -1678,26 +1696,6 @@ object functions {
*/
def hex(column: Column): Column = withExpr { Hex(column.expr) }

/**
* Return true iff the column is NaN.
*
* Both inputs should be floating point columns (DoubleType or FloatType).
*
* @group math_funcs
* @since 1.6.0
*/
def isnan(e: Column): Column = withExpr { IsNaN(e.expr) }

/**
* Returns col1 if it is not NaN, or col2 if col1 is NaN.
*
* Both inputs should be floating point columns (DoubleType or FloatType).
*
* @group math_funcs
* @since 1.5.0
*/
def nanvl(col1: Column, col2: Column): Column = withExpr { NaNvl(col1.expr, col2.expr) }

/**
* Inverse of hex. Interprets each pair of characters as a hexadecimal number
* and converts to the byte representation of number.
Expand Down

0 comments on commit 2bbc750

Please sign in to comment.