cxzl25 opened a new pull request, #8965:
URL: https://github.com/apache/paimon/pull/8965
### Purpose
`PaimonAnalyzeTableColumnCommand` computed `mergedRecordSize` as:
```scala
totalSize * (mergedRecordCount.toDouble / totalRecordCount).toLong
```
The .toLong was applied to the ratio before multiplying by totalSize. Since
mergedRecordCount <= totalRecordCount, the ratio is always in [0, 1], so it
gets truncated to 0 whenever mergedRecordCount < totalRecordCount (e.g. after
updates on a primary-key table), making mergedRecordSize incorrectly 0 even
though there is data.
### Tests
```bash
mvn -pl paimon-spark/paimon-spark-3.5 -am -Pfast-build -Pspark3 \
-DwildcardSuites=org.apache.paimon.spark.sql.AnalyzeTableTest \
-DfailIfNoTests=false -Dtest=none test -o
```
--
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]