bmarcott commented on a change in pull request #30889:
URL: https://github.com/apache/spark/pull/30889#discussion_r549657869
##########
File path: mllib/src/main/scala/org/apache/spark/ml/tree/treeModels.scala
##########
@@ -401,8 +403,13 @@ private[ml] object DecisionTreeModelReadWrite {
}
val dataPath = new Path(path, "data").toString
- val data = sparkSession.read.parquet(dataPath).as[NodeData]
- buildTreeFromNodes(data.collect(), impurityType)
+ var df = sparkSession.read.parquet(dataPath)
Review comment:
you can create the StructType automatically from the case class like:
`Encoders.product[NodeData].schema`
...but I couldn't find a way to utilize default values, so the new column is
all null.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]