zhengruifeng opened a new pull request, #58384:
URL: https://github.com/apache/spark/pull/58384
### What changes were proposed in this pull request?
This is a follow-up to #58341. It:
- reads the second value of `LinearSVCModel`'s dense raw-prediction vector
with the SQL `fget`
expression instead of the generic sparse-aware `vector_get` expression;
- evaluates `rawScore > threshold` before the NaN check, allowing the
generated expression to skip
the NaN check when the threshold comparison is false; and
- documents which `ClassificationModel` column-producing methods are used
for each configured
output-column combination.
### Why are the changes needed?
`LinearSVCModel.predictRawColumn` always produces a dense two-element
vector, so the generic
vector accessor's sparse-vector handling is unnecessary. The reordered
predicate avoids work on
the common false branch, and the Scaladoc makes the transform routing
between column-producing
methods explicit for model implementers.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
```bash
JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 ./build/sbt \
mllib/scalastyle \
mllib/doc \
'mllib/testOnly org.apache.spark.ml.classification.ClassifierSuite
org.apache.spark.ml.classification.LinearSVCSuite'
```
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: 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]