Skip to content

Commit 6950650

Browse files
committed
Improve error message in bucket function.
1 parent 12097ec commit 6950650

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sql/core/src/main/scala/org/apache/spark/sql/functions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3986,7 +3986,7 @@ object functions {
39863986
case lit @ Literal(_, IntegerType) =>
39873987
Bucket(lit, e.expr)
39883988
case _ =>
3989-
throw new AnalysisException(s"Invalid number of buckets: $numBuckets")
3989+
throw new AnalysisException(s"Invalid number of buckets: bucket($numBuckets, $e)")
39903990
}
39913991
}
39923992

0 commit comments

Comments
 (0)