public void analyzeBucketVersion() {
      List<OperatorBucketingVersionInfo> bucketingVersions = getBucketingVersions();
      bucketingVersions.sort(OperatorBucketingVersionInfo.MANDATORY_FIRST);
      try {
        for (OperatorBucketingVersionInfo info : bucketingVersions) {
          setVersion(info);
        }
      } catch (Exception e) {
        throw new RuntimeException("Error setting bucketingVersion for group: " + bucketingVersions, e);
      }
      if (version == -1) {
        // use version 2 if possible
        version = 2;
      }
    }
A Group of operators which must have the same bucketing version.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/BucketVersionPopulator.java