dennismdejong opened a new pull request, #13669: URL: https://github.com/apache/gravitino/pull/13669
### What changes were proposed in this pull request? `LancePartitionStatisticStorage.dropStatistics` no longer returns a hard-coded success count. It now counts the matching rows with `Dataset.countRows(filter)` before deleting via `Dataset.delete(filter)`, and `dropStatistics` sums the per-object counts so the returned value reflects how many statistics were actually removed. ### Why are the changes needed? Previously the Lance backend always returned `1` as a placeholder. That value is converted to a boolean in `StatisticManager.dropPartitionStatistics` (`!= 0` becomes `true`), so the REST API reported `DropResponse(true)` even when the target partition or statistic did not exist and nothing was deleted. Fix: #10620 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Added `testDropStatisticsReturnsAccurateCount` covering non-existent partition / statistic (returns 0), mixed existing and non-existing statistics (only existing ones counted), and dropping already-deleted statistics (returns 0). Existing tests now assert the returned counts (1 and 2). All tests in `TestLancePartitionStatisticStorage` and `TestStatisticManager` pass. -- 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]
