Github user srowen commented on a diff in the pull request:
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/tree/impl/RandomForest.scala ---
    @@ -1107,9 +1108,11 @@ private[spark] object RandomForest extends Logging {
               .getOrElseUpdate(treeIndex, new mutable.HashMap[Int, 
               = new NodeIndexInfo(numNodesInGroup, featureSubset)
    +        numNodesInGroup += 1
    +        memUsage += nodeMemUsage
    +      } else {
    +        flag = false
    --- End diff --
    "flag" isn't that descriptive. What about simply clearing the stack to make 
the loop terminate naturally? or a break?
    Actually can the loop just use `nodeStack.pop()` at the top? it isn't 
necessary to peek at it with top and then later decide to pop. It can be 
removed no matter what.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to