kosiew opened a new pull request, #25965: URL: https://github.com/apache/datafusion/pull/25965
## Which issue does this PR close? This is the last of a series of PR which - Closes #25141 ## Rationale for this change The `ensure_distribution_shares_statistics_cache` regression test still describes cache reset behavior that is no longer part of the intended `StatisticsContext` contract. The issue moves cache correctness away from an `EnsureRequirements` rewrite-specific reset protocol. The existing regression should therefore describe only what it actually verifies: that sharing one `StatisticsContext` across the distribution pass reduces repeated statistics computation compared with creating a fresh context for each node. ## What changes are included in this PR? This PR updates comments and Rustdoc around `ensure_distribution_shares_statistics_cache` to remove references to `reset_cache()` behavior. In particular, it: - describes the regression in terms of sharing a `StatisticsContext` across nodes rather than resetting the cache - clarifies that the baseline allocates a fresh `StatisticsContext` per node - removes the implication that the fixpoint plan is important because it prevents cache resets - narrows the final assertion comment to the invariant the test actually checks: a shared context performs fewer statistics computations than a fresh context per node There are no executable code changes in this patch. ## Are these changes tested? The existing `ensure_distribution_shares_statistics_cache` regression test is unchanged. It continues to compare the real `EnsureRequirements` path using a shared `StatisticsContext` against a baseline that creates a fresh context per node at depths 4 and 12, and asserts that the shared path performs fewer leaf-statistics computations. No new test cases are added by this patch. ## Are there any user-facing changes? No. This patch only updates test comments and Rustdoc to match the intended statistics-cache contract. There are no public API or runtime behavior changes in this patch. ## LLM-generated code disclosure This PR includes LLM-generated code and comments. All LLM-generated content has been manually reviewed. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
