Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-12346

GLM summary crashes with NoSuchElementException if attributes are missing names

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6.1, 2.0.0
    • Component/s: SparkR
    • Labels:
      None

      Description

      In getModelFeatures() of SparkRWrappers.scala, we call _.name.get on all the feature column attributes. This fails when the attribute name is not defined.

      One way of reproducing this is to perform glm() in R with a vector-type input feature that lacks ML attrs, then trying to call summary() on it, for example:

      df <- sql(sqlContext, "SELECT * FROM testData")
      df2 <- withColumnRenamed(df, "f1", "f2") // This drops the ML attrs from f1
      
      lrModel <- glm(hours_per_week ~ f2, data = df2, family = "gaussian")
      summary(lrModel) // NoSuchElementException
      

        Attachments

          Activity

            People

            • Assignee:
              ekhliang Eric Liang
              Reporter:
              ekhliang Eric Liang
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: