hutiefang76 opened a new pull request, #4406: URL: https://github.com/apache/amoro/pull/4406
## Why are the changes needed? Fix #4405. The snapshot descriptor reports total file count and total records, but calculates file size as added bytes plus removed bytes. After appending a 200-byte file to a table containing a 100-byte file, it reports 200 bytes rather than 300. Deleting the 100-byte file then reports 100 bytes rather than the remaining 200. Reading the total size would make these statistics consistent with one another and with the other format descriptors. ## Brief change log Read `SnapshotSummary.TOTAL_FILE_SIZE_PROP` for snapshot file size. Add append, delete and empty-table regression tests using a temporary Iceberg table. ## How was this patch tested? - [x] Add regression tests covering the changed behavior. - [x] Run tests locally before making a pull request. The new suite has 3 tests. On the original implementation, the append and delete assertions fail; with the change all 3 pass. ```shell ./mvnw -B -ntp -Pjava11,skip-dashboard-build -pl amoro-ams -am -Dsurefire.failIfNoSpecifiedTests=false -Dtest=TestSnapshotFileSize,TestIcebergServerTableDescriptor test ``` The selected suites passed on Java 11 and Java 17: 13 tests per JDK, with no failures, errors or skips. The Java 17 run used a clean build and the `java17` profile. Spotless and Checkstyle checks passed. The full test suite and browser tests were not run. ## Documentation - Does this pull request introduce a new feature? no - How is the feature documented? not applicable Code was assisted by DeepSeek v4 Flash via Reasonix 1.39.4; submission text was assisted by Codex. The patch and local test results were reviewed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
