Github user dongjoon-hyun commented on a diff in the pull request:
https://github.com/apache/spark/pull/20321#discussion_r162489182
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/classification/Classifier.scala ---
@@ -109,7 +109,7 @@ abstract class Classifier[
case None =>
// Get number of classes from dataset itself.
val maxLabelRow: Array[Row] =
dataset.select(max($(labelCol))).take(1)
- if (maxLabelRow.isEmpty) {
+ if (maxLabelRow.isEmpty || maxLabelRow(0).get(0) == null) {
--- End diff --
Hi, @tovbinm .
If this is a correctness issue, could you add a new test case for your new
contribution?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]