From 9e0f9591afccc97cd54a133d8ed10512d14f4f91 Mon Sep 17 00:00:00 2001 From: Kazuaki Ishizaki Date: Thu, 30 Aug 2018 11:21:40 -0500 Subject: [PATCH] [SPARK-23997][SQL][FOLLOWUP] Update exception message ## What changes were proposed in this pull request? This PR is an follow-up PR of #21087 based on [a discussion thread](https://github.com/apache/spark/pull/21087#discussion_r211080067]. Since #21087 changed a condition of `if` statement, the message in an exception is not consistent of the current behavior. This PR updates the exception message. ## How was this patch tested? Existing UTs Closes #22269 from kiszk/SPARK-23997-followup. Authored-by: Kazuaki Ishizaki Signed-off-by: Sean Owen --- .../org/apache/spark/sql/catalyst/catalog/interface.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala index 3842d794ba..30ded13410 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala @@ -178,8 +178,8 @@ case class BucketSpec( if (numBuckets <= 0 || numBuckets > conf.bucketingMaxBuckets) { throw new AnalysisException( - s"Number of buckets should be greater than 0 but less than bucketing.maxBuckets " + - s"(`${conf.bucketingMaxBuckets}`). Got `$numBuckets`") + s"Number of buckets should be greater than 0 but less than or equal to " + + s"bucketing.maxBuckets (`${conf.bucketingMaxBuckets}`). Got `$numBuckets`") } override def toString: String = {