diff --git a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala index 1199cd8df6a99..2c8b82357cc75 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala @@ -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]]. @@ -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` * @@ -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 @@ -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 //////////////////////////////////////////////////////////////////////////////////////////////