/** * Check table is not misconfigured. * @param table Table to check * @param outputDesc HiveOutputDescription to use */ private static void sanityCheck(Table table, HiveOutputDescription outputDesc) { StorageDescriptor sd = table.getSd(); Preconditions.checkArgument(!sd.isCompressed()); Preconditions.checkArgument(nullOrEmpty(sd.getBucketCols())); Preconditions.checkArgument(nullOrEmpty(sd.getSortCols())); Preconditions.checkArgument(table.getPartitionKeysSize() == outputDesc.numPartitionValues()); }