private void checkBucketId(int bucketPropertyFromRecord) throws IOException {
        int bucketIdFromRecord = BucketCodec.determineVersion(bucketPropertyFromRecord)
          .decodeWriterId(bucketPropertyFromRecord);
        if(bucketIdFromRecord != bucketForSplit) {
          DeleteRecordKey dummy = new DeleteRecordKey();
          setCurrentDeleteKey(dummy);
          throw new IOException("Corrupted records with different bucket ids "
              + "from the containing bucket file found! Expected bucket id "
              + bucketForSplit + ", however found " + dummy
              + ".  (" + orcSplit + "," + deleteDeltaFile + ")");
        }
      }
Whenever we are reading a batch, we must ensure that all the records in the batch
have the same bucket id as the bucket id of the split. If not, throw exception.
ql/src/java/org/apache/hadoop/hive/ql/io/orc/VectorizedOrcAcidRowBatchReader.java