Skip to content

Commit cb7fe50

Browse files
zsxwingrxin
authored andcommitted
SPARK-1925: Replace '&' with '&&'
JIRA: https://issues.apache.org/jira/browse/SPARK-1925 Author: zsxwing <[email protected]> Closes apache#879 from zsxwing/SPARK-1925 and squashes the following commits: 5cf5a6d [zsxwing] SPARK-1925: Replace '&' with '&&'
1 parent bee6c4f commit cb7fe50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ object DecisionTree extends Serializable with Logging {
401401
*/
402402
def isSampleValid(parentFilters: List[Filter], labeledPoint: LabeledPoint): Boolean = {
403403
// leaf
404-
if ((level > 0) & (parentFilters.length == 0)) {
404+
if ((level > 0) && (parentFilters.length == 0)) {
405405
return false
406406
}
407407

@@ -454,7 +454,7 @@ object DecisionTree extends Serializable with Logging {
454454
val bin = binForFeatures(mid)
455455
val lowThreshold = bin.lowSplit.threshold
456456
val highThreshold = bin.highSplit.threshold
457-
if ((lowThreshold < feature) & (highThreshold >= feature)){
457+
if ((lowThreshold < feature) && (highThreshold >= feature)){
458458
return mid
459459
}
460460
else if (lowThreshold >= feature) {

0 commit comments

Comments
 (0)