Skip to content

Commit

Permalink
Add a TODO to use binary search in the range partitioner.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sun Rui committed Feb 5, 2015
1 parent 91b2fd6 commit 8043559
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/R/RDD.R
Original file line number Diff line number Diff line change
Expand Up @@ -1883,6 +1883,7 @@ setMethod("sortByKey",
rangePartitionFunc <- function(key) {
partition <- 0

// TODO: Use binary search instead of linear search, similar with Spark
while (partition < length(rangeBounds) && key > rangeBounds[[partition + 1]]) {
partition <- partition + 1
}
Expand Down

0 comments on commit 8043559

Please sign in to comment.