boneanxs opened a new pull request, #7482: URL: https://github.com/apache/hudi/pull/7482
### Change Logs _Describe context and summary for this change. Highlight if any code was copied._ If we enable column stats, for cow table, we'll calculate the stats by reading the parquet footer, calling `columnChunkMetaData.getValueCount()` to get results, this value count actually contains `NULL` count. But for MOR table, we don't contain null values for valueCount. So this pr tries to fix it. We can also see the test `TestColumnStatsIndex#testMetadataColumnStatsIndex` could fail because of this issue, as c3 could update null values, so if the table is MOR type, and we use c3's valueCount in https://github.com/apache/hudi/blob/268221e4e52183592d36b3b6aff937bc87c3dca6/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/ColumnStatsIndexSupport.scala#L254, the test could fail. ![Screenshot 2022-12-15 at 11 09 41](https://user-images.githubusercontent.com/10115332/208050494-7903fcff-6a65-4335-8a0e-a71a7b9ca0b8.png) ### Impact _Describe any public API or user-facing feature change or any performance impact._ Make the valuecount consistent between COW and MOR ### Risk level (write none, low medium or high below) _If medium or high, explain what verification was done to mitigate the risks._ none ### Documentation Update _Describe any necessary documentation update if there is any new feature, config, or user-facing change_ - _The config description must be updated if new configs are added or the default value of the configs are changed_ - _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make changes to the website._ ### Contributor's checklist - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [ ] Change Logs and Impact were stated clearly - [ ] Adequate tests were added if applicable - [ ] CI passed -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org