[HUDI-3709] Fixing ParquetWriter impls not respecting Parquet Max File Size limit (#5129)
This commit is contained in:
@@ -56,7 +56,7 @@ public class HoodieInternalRowParquetWriter extends ParquetWriter<InternalRow>
|
||||
|
||||
@Override
|
||||
public boolean canWrite() {
|
||||
return fs.getBytesWritten(file) < maxFileSize;
|
||||
return getDataSize() < maxFileSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -437,7 +437,7 @@ public class TestCopyOnWriteActionExecutor extends HoodieClientTestBase {
|
||||
counts++;
|
||||
}
|
||||
}
|
||||
assertEquals(3, counts, "If the number of records are more than 1150, then there should be a new file");
|
||||
assertEquals(5, counts, "If the number of records are more than 1150, then there should be a new file");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user