Skip to content


BucketSpec is the bucketing specification of a table (the metadata of a bucketed table).

BucketSpec is a SQLConfHelper

Creating Instance

BucketSpec takes the following to be created:

BucketSpec is created when:

Number of Buckets

BucketSpec is given the number of buckets when created.

The number of buckets has to be between 0 and spark.sql.sources.bucketing.maxBuckets (inclusive) or an AnalysisException is reported:

Number of buckets should be greater than 0 but less than or equal to bucketing.maxBuckets (`[bucketingMaxBuckets]`). Got `[numBuckets]`.