diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index 8edc1710e8485..93256bc9e0143 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -967,6 +967,7 @@ object Unidoc { .map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/internal"))) .map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/hive"))) .map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/catalog/v2/utils"))) + .map(_.filterNot(_.getCanonicalPath.contains("org.apache.spark.errors"))) .map(_.filterNot(_.getCanonicalPath.contains("org.apache.spark.sql.errors"))) .map(_.filterNot(_.getCanonicalPath.contains("org/apache/hive"))) .map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/v2/avro"))) diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/bitwiseExpressions.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/bitwiseExpressions.scala index 3940c65593ec5..57ab9e2773e31 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/bitwiseExpressions.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/bitwiseExpressions.scala @@ -233,10 +233,10 @@ object BitwiseGetUtil { @ExpressionDescription( usage = """ - |_FUNC_(expr, pos) - Returns the value of the bit (0 or 1) at the specified position. - | The positions are numbered from right to left, starting at zero. - | The position argument cannot be negative. - """, + _FUNC_(expr, pos) - Returns the value of the bit (0 or 1) at the specified position. + The positions are numbered from right to left, starting at zero. + The position argument cannot be negative. + """, examples = """ Examples: > SELECT _FUNC_(11, 0); diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/intervalExpressions.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/intervalExpressions.scala index 5b111d17cdcd6..c799c69b9a2ce 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/intervalExpressions.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/intervalExpressions.scala @@ -227,7 +227,7 @@ case class DivideInterval( // scalastyle:off line.size.limit @ExpressionDescription( - usage = "_FUNC_(years, months, weeks, days, hours, mins, secs) - Make interval from years, months, weeks, days, hours, mins and secs.", + usage = "_FUNC_([years[, months[, weeks[, days[, hours[, mins[, secs]]]]]]]) - Make interval from years, months, weeks, days, hours, mins and secs.", arguments = """ Arguments: * years - the number of years, positive or negative @@ -360,7 +360,7 @@ case class MakeInterval( // scalastyle:off line.size.limit @ExpressionDescription( - usage = "_FUNC_(days, hours, mins, secs) - Make DayTimeIntervalType duration from days, hours, mins and secs.", + usage = "_FUNC_([days[, hours[, mins[, secs]]]]) - Make DayTimeIntervalType duration from days, hours, mins and secs.", arguments = """ Arguments: * days - the number of days, positive or negative @@ -372,6 +372,8 @@ case class MakeInterval( Examples: > SELECT _FUNC_(1, 12, 30, 01.001001); 1 12:30:01.001001000 + > SELECT _FUNC_(2); + 2 00:00:00.000000000 > SELECT _FUNC_(100, null, 3); NULL """, @@ -436,7 +438,7 @@ case class MakeDTInterval( } @ExpressionDescription( - usage = "_FUNC_(years, months) - Make year-month interval from years, months.", + usage = "_FUNC_([years[, months]]) - Make year-month interval from years, months.", arguments = """ Arguments: * years - the number of years, positive or negative @@ -450,6 +452,8 @@ case class MakeDTInterval( 1-0 > SELECT _FUNC_(-1, 1); -0-11 + > SELECT _FUNC_(2); + 2-0 """, since = "3.2.0", group = "datetime_funcs")