Github user WeichenXu123 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19516#discussion_r146513000
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/feature/ChiSqSelector.scala ---
    @@ -291,9 +291,13 @@ final class ChiSqSelectorModel private[ml] (
         val featureAttributes: Array[Attribute] = if 
(origAttrGroup.attributes.nonEmpty) {
           origAttrGroup.attributes.get.zipWithIndex.filter(x => 
selector.contains(x._2)).map(_._1)
         } else {
    -      Array.fill[Attribute](selector.size)(NominalAttribute.defaultAttr)
    +      null
    --- End diff --
    
    Instead of removing this, I think the better way is fill the `values` or 
`numValues` member here.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to