kosiew opened a new pull request, #25826:
URL: https://github.com/apache/datafusion/pull/25826

   ## Which issue does this PR close?
   
   Part of #25141.
   
   ## Rationale for this change
   
   `compute_extended` currently reads a root node’s provider extensions back 
from the cache after computing its statistics. A planned change will stop 
caching borrowed roots, so that read would lose their extensions. Returning the 
extensions from the statistics walk preserves the result without depending on a 
root cache entry.
   
   ## What changes are included in this PR?
   
   - Return statistics and provider extensions together from the private 
statistics walk. `compute_extended` uses that result; `compute` keeps returning 
only the statistics.
   - Continue caching provider extensions for parent nodes. On a cache hit, 
read them only when the caller requests them.
   - Replace `ExtendedStatistics::extensions()` with `into_parts()` to move its 
statistics and extensions into the walk’s result.
   
   The public signatures of `compute` and `compute_extended` are unchanged.
   
   ## Are these changes tested?
   
   The patch adds `cached_node_keeps_extensions` and 
`walk_returns_provider_extensions_directly`. They cover extensions returned 
after a child is cached, extensions returned from a fresh provider result, and 
cache reads that occur only when requested. The provided diff does not show 
test execution results.
   
   ## Are there any user-facing changes?
   
   No user-facing change is intended. This refactor preserves provider 
extension behavior ahead of the planned cache change.
   
   ## 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]

Reply via email to