title: pyspark ML LabeledPoint not working with LinearRegression
body: <p>I'm studying Spark 3.0.1 with pyspark, and have setup some data for simple OLS regression using</p>
  <pre><code>data = results.select('OrderMonthYear', 'SaleAmount').rdd.map(lambda row: LabeledPoint(row[1], [row[0]])).toDF()
  </code></pre>
  <p>The <code>OrderMonthYear</code> is my feature column (int), and <code>SaleAmount</code> is the response (float). The <code>LabeledPoint</code> method was imported from <code>pyspark.mllib.regression</code>.  I then try to fit the regression model with</p>
  <pre><code>from pyspark.ml.regression import LinearRegression
  lr = LinearRegression()
  modelA = lr.fit(data, {lr.regParam:0.0})
  </code></pre>
  <p>to get this exception</p>
  <pre><code>IllegalArgumentException: requirement failed: Column features must be of type struct&lt;type:tinyint,size:int,indices:array&lt;int&gt;,values:array&lt;double&gt;&gt; but was actually struct&lt;type:tinyint,size:int,indices:array&lt;int&gt;,values:array&lt;double&gt;&gt;.
  </code></pre>
  <p>This is clearly not very helpful, as the required and passed features seem to be the same structs. I've searched online, and only found answers to this problem for java, or for someone building the struct themselves. The exception was thrown from a util function that was just throwing a java exception (<code>#Hide where the exception came from that shows a non-Pythonic JVM exception message.</code>), so I can't debug further.</p>