liujiayi771 opened a new pull request, #9131:
URL: https://github.com/apache/paimon/pull/9131

   ### Purpose
   
   When `manifest.delete-file.drop-stats` is enabled, scan-level `dropStats()` 
strips stats from every scanned manifest entry, not just DELETE entries. During 
primary-key compaction, metadata-only level upgrades can reuse the same data 
file for DELETE and ADD entries. If compactor or restore scans drop the stats 
first, the ADD entry permanently loses file value stats and subsequent reads 
lose data-skipping metadata.
   
   This change keeps stats on scan results and applies `copyWithoutStats()` 
only while constructing DELETE manifest entries. ADD entries therefore preserve 
file stats, while DELETE entries still omit them according to the configured 
option.
   
   ### Tests
   
   - `ASDF_MAVEN_VERSION=3.9.9 mvn -pl paimon-core -Pfast-build 
-DwildcardSuites=none 
-Dtest=TableWriteTest#testDropStatsOnlyForDeleteManifestEntries test`
   - `ASDF_MAVEN_VERSION=3.9.9 mvn -pl paimon-flink/paimon-flink-common 
-Pfast-build -Pflink1 -DwildcardSuites=none 
-Dtest=TableWriteCoordinatorTest#testScanPreservesStatsWhenDeleteManifestStatsAreDropped,CompactorSourceITCase#testStreamingReadPreservesStatsWhenDeleteManifestStatsAreDropped
 test`
   - `git diff --check github/master...HEAD`


-- 
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]

Reply via email to