Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions sql/core/src/main/scala/org/apache/spark/sql/functions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,14 @@ object functions {
*/
def bitwiseNOT(e: Column): Column = withExpr { BitwiseNot(e.expr) }

/**
* Computes bitwise NOT (~) of a number.
*
* @group normal_funcs
* @since 1.4.0
*/
def bitwiseNOT(columnName: String): Column = bitwiseNOT(Column(columnName))

/**
* Parses the expression string into the column that it represents, similar to
* [[Dataset#selectExpr]].
Expand Down Expand Up @@ -1301,6 +1309,14 @@ object functions {
*/
def abs(e: Column): Column = withExpr { Abs(e.expr) }

/**
* Computes the absolute value of a numeric value.
*
* @group math_funcs
* @since 1.3.0
*/
def abs(columnName: String): Column = abs(Column(columnName))

/**
* @return inverse cosine of `e` in radians, as if computed by `java.lang.Math.acos`
*
Expand Down Expand Up @@ -2293,6 +2309,14 @@ object functions {
*/
def lower(e: Column): Column = withExpr { Lower(e.expr) }

/**
* Converts a string column to lower case.
*
* @group string_funcs
* @since 1.3.0
*/
def lower(columnName: String): Column = lower(Column(columnName))

/**
* Computes the Levenshtein distance of the two given string columns.
* @group string_funcs
Expand Down Expand Up @@ -2540,6 +2564,14 @@ object functions {
*/
def upper(e: Column): Column = withExpr { Upper(e.expr) }

/**
* Converts a string column to upper case.
*
* @group string_funcs
* @since 1.3.0
*/
def upper(columnName: String): Column = upper(Column(columnName))

//////////////////////////////////////////////////////////////////////////////////////////////
// DateTime functions
//////////////////////////////////////////////////////////////////////////////////////////////
Expand Down