zhengruifeng opened a new pull request, #515:
URL: https://github.com/apache/spark-connect-rust/pull/515

   ### What changes were proposed in this pull request?
   
   Add native Rust `DecisionTreeRegressor` and `DecisionTreeRegressionModel`, 
plus `pyspark.ml.connect.regression.DecisionTreeRegressor` and its top-level 
Connect export. The estimator fits Spark's JVM implementation through the 
Connect ML command; fitted models transform DataFrames through their cached 
server references.
   
   Rust setters/getters cover all 16 Spark 4.3.0 constructor parameters, 
including `varianceCol`, `weightCol` and `leafCol`. The Python constructor 
mirrors the official keyword-only signature and uses the existing parameter 
conversion and fit helpers. Models, clones and lazy transformed DataFrames 
retain the cached model in its fitting session until their last owner is 
dropped.
   
   Add official PySpark wire fixtures, Rust and native Python tests, 
compatibility documentation and the live Rust test target to CI.
   
   ### Why are the changes needed?
   
   The native Rust and native Python Connect APIs currently lack 
DecisionTreeRegressor. This makes decision-tree regression available through 
the same native path as DecisionTreeClassifier and RandomForestRegressor.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. The new estimator supports continuous numeric labels, ML vector 
features, instance weights, custom column names, prediction output, optional 
weighted variance within the predicted leaf and optional scalar double leaf 
IDs. This addition covers fitting and DataFrame transformation; tree 
inspection, feature importances, single-vector prediction and persistence are 
outside its scope.
   
   ### How was this patch tested?
   
   - 604 Rust library tests passed; all integration tests compile in release 
mode, both with and without `wasm-udf`.
   - Official PySpark 4.3.0 wire fixtures cover all 16 parameters and six seed 
boundaries; the Rust golden test and four live Rust tests passed.
   - The same five DecisionTreeRegressor behavior cases passed with official 
PySpark and the rebuilt native Python extension. They exercise 
constructor/setter equivalence, nonlinear continuous labels, scalar leaf IDs, 
weighted leaf variances, weights, repeated fits, invalid parameters/data and 
lazy model lifetime. Shared native ML tests cover server-model cleanup and 
cross-session rejection.
   - 1,931 native Python offline tests passed (8 skipped); seven selected 
native live tests passed.
   - Official Spark 4.3.0 Connect suite through the rebuilt Rust transport: 
2,638 passed, 589 skipped across 87 files, zero unexpected failures.
   - The 12-class public API introspection comparison found no unexpected gaps. 
Rust formatting, Ruff 0.14.0 lint/format, vendored-path lint exclusions and 
whitespace checks passed. Direct Clippy checks of the Rust library and new 
integration targets passed. Workspace/binding Clippy has 52 existing error 
sites, verified against the exact base source; this patch introduces none.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Codex (GPT-6)
   
   This pull request and its description were written by Isaac.
   


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