zhengruifeng opened a new pull request, #512: URL: https://github.com/apache/spark-connect-rust/pull/512
### What changes were proposed in this pull request? Add native Rust `DecisionTreeClassifier` and `DecisionTreeClassificationModel`, plus `pyspark.ml.connect.classification.DecisionTreeClassifier` 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 18 Spark 4.3.0 constructor parameters, including `pruneTree`, plus class thresholds. The Python constructor mirrors the official keyword-only signature and uses the existing native 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 DecisionTreeClassifier. This makes binary and multiclass decision-tree training available through the same native path as the existing random forests. ### Does this PR introduce _any_ user-facing change? Yes. The new estimator supports ML vector features, instance weights, custom column names, prediction/probability/raw weighted class-count outputs and an optional scalar double leaf-index column. 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? - 602 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 every parameter and six seed boundaries; the Rust golden test and four live Rust tests passed. - The same five DecisionTreeClassifier behavior cases passed with official PySpark and the rebuilt native Python extension. Native coverage includes constructor/setter equivalence, nonlinear labels, multiclass probabilities, raw class counts, scalar leaves, weights, thresholds, repeated fits, invalid parameters/data, cached-model cleanup and session isolation. - 1,929 native Python offline tests passed (8 skipped); seven selected native live tests passed. The 12-class API introspection comparison found no missing public APIs. - Official Spark 4.3.0 Connect suite through the rebuilt Rust transport: 2,638 passed, 589 skipped across 87 files, zero unexpected failures. - 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 49 existing error sites, confirmed on the exact base commit; 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]
