Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sharding: fix a bug that partial range is handled as all range
- Loading branch information
Showing
5 changed files
with
117 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
80 changes: 80 additions & 0 deletions
80
...nd/suite/sharding/logical_range_filter/index/condition/range/min_include_partial.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| load --table Logs_20150203 | ||
| [ | ||
| {"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, | ||
| {"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, | ||
| {"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, | ||
| {"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} | ||
| ] | ||
| [[0,0.0,0.0],4] | ||
| load --table Logs_20150204 | ||
| [ | ||
| {"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, | ||
| {"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, | ||
| {"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, | ||
| {"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, | ||
| {"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, | ||
| {"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} | ||
| ] | ||
| [[0,0.0,0.0],6] | ||
| load --table Logs_20150205 | ||
| [ | ||
| {"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, | ||
| {"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, | ||
| {"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, | ||
| {"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-03 23:59:59" --min_border "include" | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| "memo", | ||
| "ShortText" | ||
| ], | ||
| [ | ||
| "message", | ||
| "Text" | ||
| ], | ||
| [ | ||
| "timestamp", | ||
| "Time" | ||
| ] | ||
| ], | ||
| [ | ||
| "2015-02-03 23:59:59", | ||
| "Shutdown", | ||
| 1422975599.0 | ||
| ], | ||
| [ | ||
| "2015-02-04 00:00:00", | ||
| "Shutdown", | ||
| 1422975600.0 | ||
| ], | ||
| [ | ||
| "2015-02-04 00:00:01", | ||
| "Shutdown", | ||
| 1422975601.0 | ||
| ], | ||
| [ | ||
| "2015-02-04 23:59:59", | ||
| "Shutdown", | ||
| 1423061999.0 | ||
| ], | ||
| [ | ||
| "2015-02-05 00:00:00", | ||
| "Shutdown", | ||
| 1423062000.0 | ||
| ], | ||
| [ | ||
| "2015-02-05 00:00:01", | ||
| "Shutdown", | ||
| 1423062001.0 | ||
| ] | ||
| ] | ||
| ] |
33 changes: 33 additions & 0 deletions
33
...ommand/suite/sharding/logical_range_filter/index/condition/range/min_include_partial.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| #@include fixture/sharding/logical_range_filter/index/schema.grn | ||
|
|
||
| load --table Logs_20150203 | ||
| [ | ||
| {"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Start"}, | ||
| {"timestamp": "2015-02-03 23:59:58", "memo": "2015-02-03 23:59:58", "message": "Shutdown"}, | ||
| {"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Start"}, | ||
| {"timestamp": "2015-02-03 23:59:59", "memo": "2015-02-03 23:59:59", "message": "Shutdown"} | ||
| ] | ||
|
|
||
| load --table Logs_20150204 | ||
| [ | ||
| {"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Start"}, | ||
| {"timestamp": "2015-02-04 00:00:00", "memo": "2015-02-04 00:00:00", "message": "Shutdown"}, | ||
| {"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Start"}, | ||
| {"timestamp": "2015-02-04 00:00:01", "memo": "2015-02-04 00:00:01", "message": "Shutdown"}, | ||
| {"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Start"}, | ||
| {"timestamp": "2015-02-04 23:59:59", "memo": "2015-02-04 23:59:59", "message": "Shutdown"} | ||
| ] | ||
|
|
||
| load --table Logs_20150205 | ||
| [ | ||
| {"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Start"}, | ||
| {"timestamp": "2015-02-05 00:00:00", "memo": "2015-02-05 00:00:00", "message": "Shutdown"}, | ||
| {"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Start"}, | ||
| {"timestamp": "2015-02-05 00:00:01", "memo": "2015-02-05 00:00:01", "message": "Shutdown"} | ||
| ] | ||
|
|
||
| logical_range_filter Logs timestamp \ | ||
| --filter 'message == "Shutdown"' \ | ||
| --min "2015-02-03 23:59:59" \ | ||
| --min_border "include" | ||
|
|