Navigation Menu

Skip to content

Commit

Permalink
logical_range_filter: change threshold meaning
Browse files Browse the repository at this point in the history
  * threshold <= 0.0: always use range index
  * threshold >= 1.0: never use range index
  • Loading branch information
kou committed Apr 2, 2015
1 parent 6413133 commit fa2db53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/sharding/logical_range_filter.rb
Expand Up @@ -230,7 +230,10 @@ def use_range_index?(range_index)
end

threshold = @context.threshold
if threshold <= 0
if threshold <= 0.0
return true
end
if threshold >= 1.0
return false
end

Expand Down

0 comments on commit fa2db53

Please sign in to comment.