bmarcott commented on a change in pull request #30889:
URL: https://github.com/apache/spark/pull/30889#discussion_r547927241
##########
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:
I guess spark schema doesn't allow setting default values (and converted
from case class) to enable something like below?
spark.read.schema(nodeDataSchema).parquet(dataPath).as[NodeData]
----------------------------------------------------------------
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]