[MINOR] Remove redundant judgments (#2466)
This commit is contained in:
@@ -153,7 +153,7 @@ public class UpsertPartitioner<T extends HoodieRecordPayload<T>> implements Part
|
|||||||
for (SmallFile smallFile : smallFiles) {
|
for (SmallFile smallFile : smallFiles) {
|
||||||
long recordsToAppend = Math.min((config.getParquetMaxFileSize() - smallFile.sizeBytes) / averageRecordSize,
|
long recordsToAppend = Math.min((config.getParquetMaxFileSize() - smallFile.sizeBytes) / averageRecordSize,
|
||||||
totalUnassignedInserts);
|
totalUnassignedInserts);
|
||||||
if (recordsToAppend > 0 && totalUnassignedInserts > 0) {
|
if (recordsToAppend > 0) {
|
||||||
// create a new bucket or re-use an existing bucket
|
// create a new bucket or re-use an existing bucket
|
||||||
int bucket;
|
int bucket;
|
||||||
if (updateLocationToBucket.containsKey(smallFile.location.getFileId())) {
|
if (updateLocationToBucket.containsKey(smallFile.location.getFileId())) {
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ public class UpsertPartitioner<T extends HoodieRecordPayload<T>> implements Part
|
|||||||
for (SmallFile smallFile : smallFiles) {
|
for (SmallFile smallFile : smallFiles) {
|
||||||
long recordsToAppend = Math.min((config.getParquetMaxFileSize() - smallFile.sizeBytes) / averageRecordSize,
|
long recordsToAppend = Math.min((config.getParquetMaxFileSize() - smallFile.sizeBytes) / averageRecordSize,
|
||||||
totalUnassignedInserts);
|
totalUnassignedInserts);
|
||||||
if (recordsToAppend > 0 && totalUnassignedInserts > 0) {
|
if (recordsToAppend > 0) {
|
||||||
// create a new bucket or re-use an existing bucket
|
// create a new bucket or re-use an existing bucket
|
||||||
int bucket;
|
int bucket;
|
||||||
if (updateLocationToBucket.containsKey(smallFile.location.getFileId())) {
|
if (updateLocationToBucket.containsKey(smallFile.location.getFileId())) {
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ public class UpsertPartitioner<T extends HoodieRecordPayload<T>> extends Partiti
|
|||||||
for (SmallFile smallFile : smallFiles) {
|
for (SmallFile smallFile : smallFiles) {
|
||||||
long recordsToAppend = Math.min((config.getParquetMaxFileSize() - smallFile.sizeBytes) / averageRecordSize,
|
long recordsToAppend = Math.min((config.getParquetMaxFileSize() - smallFile.sizeBytes) / averageRecordSize,
|
||||||
totalUnassignedInserts);
|
totalUnassignedInserts);
|
||||||
if (recordsToAppend > 0 && totalUnassignedInserts > 0) {
|
if (recordsToAppend > 0) {
|
||||||
// create a new bucket or re-use an existing bucket
|
// create a new bucket or re-use an existing bucket
|
||||||
int bucket;
|
int bucket;
|
||||||
if (updateLocationToBucket.containsKey(smallFile.location.getFileId())) {
|
if (updateLocationToBucket.containsKey(smallFile.location.getFileId())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user