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

   ### Purpose
   
   A truncation reports an exact zero for every partition it emptied. `ANALYZE` 
measures a partition
   and writes down what it found. Nothing pinned what the second does to the 
first.
   
   The failure would be silent in the direction that matters. Statistics carry 
`UNKNOWN` as a negative
   value, so a zero degraded back to unknown does not read as "this partition 
is empty" but as "nobody
   measured it", and a consumer that guards on the value being known skips the 
partition instead of
   planning for an empty one. An exact zero is a measurement; it should not be 
reachable to lose it by
   measuring again.
   
   ### Tests
   
   `CatalogManagedPartitionAnalyzeTest`: measure a partition, truncate it, then 
run `COMPUTE STATISTICS
   NOSCAN` and a full `COMPUTE STATISTICS` over it, asserting the row count and 
file count are still
   zero rather than unknown.
   
   The case needs `TRUNCATE TABLE` (#9330) and `ANALYZE TABLE` (#9298) in the 
same tree, which is why
   it could not ride along with either of them. Both are in `master` now.
   
   ### API and Format
   
   No production change; test only.
   


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