Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ulysses-you committed Aug 6, 2024
1 parent 3fbeda5 commit e263dc0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class TableSchema implements Serializable {

private final List<String> primaryKeys;

private List<String> bucketKeys;
private final List<String> bucketKeys;

private final int numBucket;

Expand Down Expand Up @@ -121,10 +121,11 @@ public TableSchema(
trimmedPrimaryKeys();

// try to validate and initalize the bucket keys
bucketKeys = originalBucketKeys();
if (bucketKeys.isEmpty()) {
bucketKeys = trimmedPrimaryKeys();
List<String> tmpBucketKeys = originalBucketKeys();
if (tmpBucketKeys.isEmpty()) {
tmpBucketKeys = trimmedPrimaryKeys();
}
bucketKeys = tmpBucketKeys;
numBucket = CoreOptions.fromMap(options).bucket();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
*/
public class BucketSpec {

private BucketMode bucketMode;
private List<String> bucketKeys;
private int numBucket;
private final BucketMode bucketMode;
private final List<String> bucketKeys;
private final int numBucket;

public BucketSpec(BucketMode bucketMode, List<String> bucketKeys, int numBucket) {
this.bucketMode = bucketMode;
Expand Down

0 comments on commit e263dc0

Please sign in to comment.