kosiew commented on code in PR #25965:
URL: https://github.com/apache/datafusion/pull/25965#discussion_r4173031315
##########
datafusion/core/tests/physical_optimizer/enforce_distribution.rs:
##########
@@ -5941,20 +5941,21 @@ impl ExecutionPlan for CountingStatsExec {
/// recurse to the leaf. With one `StatisticsContext` shared across the pass
the
/// leaf is computed once; with a fresh context per node it is recomputed once
/// per ancestor. This directly detects a regression where the cache is not
-/// actually shared (e.g. reset on every node), which no plan-output assertion
-/// can catch because the optimized plan is identical either way.
+/// actually shared (for example, by allocating a context per node), which no
+/// plan-output assertion can catch because the optimized plan is identical
either
+/// way.
#[test]
fn ensure_distribution_shares_statistics_cache() -> Result<()> {
// Count how many times a leaf's statistics are computed over a stack of
// `depth` pass-through operators sitting on top of it. Each ancestor's
// distribution enforcement inspects its child's statistics, which recurse
to
// the leaf.
//
- // The measured arm drives the real `EnsureRequirements` rule, so the
sharing
- // and the cache-reset condition under test are the ones the rule actually
- // uses — reimplementing them here would keep passing even if the rule
- // stopped sharing. The baseline arm allocates a fresh `StatisticsContext`
- // per node, reproducing the behavior before this change.
+ // The measured arm drives the real `EnsureRequirements` rule, so the
shared
+ // context under test is the one the rule actually uses — reimplementing it
+ // here would keep passing even if the rule stopped sharing. The baseline
arm
+ // allocates a fresh `StatisticsContext` per node, reproducing the behavior
+ // before this change.
Review Comment:
[Removed redundant
comment](https://github.com/apache/datafusion/pull/25965/commits/630034f3483139880352ed85b59a97d68b7e7039).
--
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]