zhztheplayer opened a new pull request, #59123:
URL: https://github.com/apache/spark/pull/59123

   ### What changes were proposed in this pull request?
   
   Add an unstable `LogicalPlanStatsEstimator` extension point and the internal 
`spark.sql.statistics.estimatorClass` configuration. The default implementation 
preserves the existing CBO and size-only behavior. A configured estimator class 
is validated and reused.
   
   ### Why are the changes needed?
   
   SQL plugins can introduce logical plans with statistics that Spark’s 
built-in visitors cannot estimate accurately. This lets a plugin supply its own 
estimator for better query planning.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Users can configure a custom statistics estimator. Without that 
configuration, behavior is unchanged.
   
   ### How was this patch tested?
   
   Added a unit test covering a custom estimate and fallback behavior with CBO 
enabled and disabled. The test has not been run locally; `git diff --check` 
passed.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Assisted-by: OpenAI Codex (GPT-5)


-- 
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