Kouhei Sutou
null+****@clear*****
Thu Apr 2 17:42:41 JST 2015
Kouhei Sutou 2015-04-02 17:42:41 +0900 (Thu, 02 Apr 2015) New Revision: 408fdd7fd30f84288e98281f5576523590c0b02b https://github.com/groonga/groonga/commit/408fdd7fd30f84288e98281f5576523590c0b02b Message: sharding: fix a bug that partial range is handled as all range Copied files: test/command/suite/sharding/logical_range_filter/index/condition/range/min_include_all.expected (from test/command/suite/sharding/logical_range_filter/index/condition/range/min_include.expected) test/command/suite/sharding/logical_range_filter/index/condition/range/min_include_all.test (from test/command/suite/sharding/logical_range_filter/index/condition/range/min_include.test) Modified files: plugins/sharding/logical_enumerator.rb Renamed files: test/command/suite/sharding/logical_range_filter/index/condition/range/min_include_partial.expected (from test/command/suite/sharding/logical_range_filter/index/condition/range/min_include.expected) test/command/suite/sharding/logical_range_filter/index/condition/range/min_include_partial.test (from test/command/suite/sharding/logical_range_filter/index/condition/range/min_include.test) Modified: plugins/sharding/logical_enumerator.rb (+4 -4) =================================================================== --- plugins/sharding/logical_enumerator.rb 2015-04-02 17:01:10 +0900 (3e19a19) +++ plugins/sharding/logical_enumerator.rb 2015-04-02 17:42:41 +0900 (90948ae) @@ -143,10 +143,10 @@ module Groonga return true if @min_border == :exclude - @min.hour != 0 and - @min.min != 0 and - @min.sec != 0 and - @min.usec != 0 + not (@min.hour == 0 and + @min.min == 0 and + @min.sec == 0 and + @min.usec == 0) end def in_max?(shard_range) Copied: test/command/suite/sharding/logical_range_filter/index/condition/range/min_include_all.expected (+0 -0) 100% =================================================================== Copied: test/command/suite/sharding/logical_range_filter/index/condition/range/min_include_all.test (+0 -0) 100% =================================================================== Renamed: test/command/suite/sharding/logical_range_filter/index/condition/range/min_include_partial.expected (+6 -1) 93% =================================================================== --- test/command/suite/sharding/logical_range_filter/index/condition/range/min_include.expected 2015-04-02 17:01:10 +0900 (28d84e8) +++ test/command/suite/sharding/logical_range_filter/index/condition/range/min_include_partial.expected 2015-04-02 17:42:41 +0900 (554aea8) @@ -24,7 +24,7 @@ load --table Logs_20150205 {"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} ] [[0,0.0,0.0],4] -logical_range_filter Logs timestamp --filter 'message == "Shutdown"' --min "2015-02-04 00:00:00" --min_border "include" +logical_range_filter Logs timestamp --filter 'message == "Shutdown"' --min "2015-02-03 23:59:59" --min_border "include" [ [ 0, @@ -47,6 +47,11 @@ logical_range_filter Logs timestamp --filter 'message == "Shutdown"' --min " ] ], [ + "2015-02-03 23:59:59", + "Shutdown", + 1422975599.0 + ], + [ "2015-02-04 00:00:00", "Shutdown", 1422975600.0 Renamed: test/command/suite/sharding/logical_range_filter/index/condition/range/min_include_partial.test (+1 -1) 97% =================================================================== --- test/command/suite/sharding/logical_range_filter/index/condition/range/min_include.test 2015-04-02 17:01:10 +0900 (77ba090) +++ test/command/suite/sharding/logical_range_filter/index/condition/range/min_include_partial.test 2015-04-02 17:42:41 +0900 (279f06d) @@ -28,6 +28,6 @@ load --table Logs_20150205 logical_range_filter Logs timestamp \ --filter 'message == "Shutdown"' \ - --min "2015-02-04 00:00:00" \ + --min "2015-02-03 23:59:59" \ --min_border "include" -------------- next part -------------- HTML����������������������������... 다운로드