Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "test: remove tests for sortby because it is deprecated"
These tests are kept for backward compatibility tests. This reverts commit cb757ac.
- Loading branch information
Showing
66 changed files
with
5,785 additions
and
0 deletions.
There are no files selected for viewing
121 changes: 121 additions & 0 deletions
121
test/command/suite/select/drilldown/labeled/sortby/sub_record_column/multiple.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,121 @@ | ||
| table_create Tags TABLE_PAT_KEY ShortText | ||
| [[0,0.0,0.0],true] | ||
| table_create Memos TABLE_HASH_KEY ShortText | ||
| [[0,0.0,0.0],true] | ||
| column_create Memos tag COLUMN_SCALAR Tags | ||
| [[0,0.0,0.0],true] | ||
| column_create Memos date COLUMN_SCALAR Time | ||
| [[0,0.0,0.0],true] | ||
| load --table Memos | ||
| [ | ||
| {"_key": "Rroonga is fast!", "tag": "Rroonga", "date": "2014-11-17 00:00:00"}, | ||
| {"_key": "Mroonga is fast!", "tag": "Mroonga", "date": "2014-11-16 00:00:00"}, | ||
| {"_key": "Groonga is fast!", "tag": "Groonga", "date": "2014-11-16 00:00:00"}, | ||
| {"_key": "Groonga sticker!", "tag": "Groonga", "date": "2014-11-16 00:00:00"}, | ||
| {"_key": "Groonga is good!", "tag": "Groonga", "date": "2014-11-17 00:00:00"} | ||
| ] | ||
| [[0,0.0,0.0],5] | ||
| select Memos --filter true --drilldown[tag].keys tag,date --drilldown[tag].output_columns _key[0],_key[1],_nsubrecs --drilldown[tag].sortby _value.tag._key,_value.date | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 5 | ||
| ], | ||
| [ | ||
| [ | ||
| "_id", | ||
| "UInt32" | ||
| ], | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ], | ||
| [ | ||
| "date", | ||
| "Time" | ||
| ], | ||
| [ | ||
| "tag", | ||
| "Tags" | ||
| ] | ||
| ], | ||
| [ | ||
| 1, | ||
| "Rroonga is fast!", | ||
| 1416150000.0, | ||
| "Rroonga" | ||
| ], | ||
| [ | ||
| 2, | ||
| "Mroonga is fast!", | ||
| 1416063600.0, | ||
| "Mroonga" | ||
| ], | ||
| [ | ||
| 3, | ||
| "Groonga is fast!", | ||
| 1416063600.0, | ||
| "Groonga" | ||
| ], | ||
| [ | ||
| 4, | ||
| "Groonga sticker!", | ||
| 1416063600.0, | ||
| "Groonga" | ||
| ], | ||
| [ | ||
| 5, | ||
| "Groonga is good!", | ||
| 1416150000.0, | ||
| "Groonga" | ||
| ] | ||
| ], | ||
| { | ||
| "tag": [ | ||
| [ | ||
| 4 | ||
| ], | ||
| [ | ||
| [ | ||
| "_key[0]", | ||
| null | ||
| ], | ||
| [ | ||
| "_key[1]", | ||
| null | ||
| ], | ||
| [ | ||
| "_nsubrecs", | ||
| "Int32" | ||
| ] | ||
| ], | ||
| [ | ||
| "Groonga", | ||
| 1416063600.0, | ||
| 2 | ||
| ], | ||
| [ | ||
| "Groonga", | ||
| 1416150000.0, | ||
| 1 | ||
| ], | ||
| [ | ||
| "Mroonga", | ||
| 1416063600.0, | ||
| 1 | ||
| ], | ||
| [ | ||
| "Rroonga", | ||
| 1416150000.0, | ||
| 1 | ||
| ] | ||
| ] | ||
| } | ||
| ] | ||
| ] |
20 changes: 20 additions & 0 deletions
20
test/command/suite/select/drilldown/labeled/sortby/sub_record_column/multiple.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,20 @@ | ||
| table_create Tags TABLE_PAT_KEY ShortText | ||
|
|
||
| table_create Memos TABLE_HASH_KEY ShortText | ||
| column_create Memos tag COLUMN_SCALAR Tags | ||
| column_create Memos date COLUMN_SCALAR Time | ||
|
|
||
| load --table Memos | ||
| [ | ||
| {"_key": "Rroonga is fast!", "tag": "Rroonga", "date": "2014-11-17 00:00:00"}, | ||
| {"_key": "Mroonga is fast!", "tag": "Mroonga", "date": "2014-11-16 00:00:00"}, | ||
| {"_key": "Groonga is fast!", "tag": "Groonga", "date": "2014-11-16 00:00:00"}, | ||
| {"_key": "Groonga sticker!", "tag": "Groonga", "date": "2014-11-16 00:00:00"}, | ||
| {"_key": "Groonga is good!", "tag": "Groonga", "date": "2014-11-17 00:00:00"} | ||
| ] | ||
|
|
||
| select Memos \ | ||
| --filter true \ | ||
| --drilldown[tag].keys tag,date \ | ||
| --drilldown[tag].output_columns _key[0],_key[1],_nsubrecs \ | ||
| --drilldown[tag].sortby _value.tag._key,_value.date |
121 changes: 121 additions & 0 deletions
121
test/command/suite/select/drilldowns/sortby/sub_record_column/multiple.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,121 @@ | ||
| table_create Tags TABLE_PAT_KEY ShortText | ||
| [[0,0.0,0.0],true] | ||
| table_create Memos TABLE_HASH_KEY ShortText | ||
| [[0,0.0,0.0],true] | ||
| column_create Memos tag COLUMN_SCALAR Tags | ||
| [[0,0.0,0.0],true] | ||
| column_create Memos date COLUMN_SCALAR Time | ||
| [[0,0.0,0.0],true] | ||
| load --table Memos | ||
| [ | ||
| {"_key": "Rroonga is fast!", "tag": "Rroonga", "date": "2014-11-17 00:00:00"}, | ||
| {"_key": "Mroonga is fast!", "tag": "Mroonga", "date": "2014-11-16 00:00:00"}, | ||
| {"_key": "Groonga is fast!", "tag": "Groonga", "date": "2014-11-16 00:00:00"}, | ||
| {"_key": "Groonga sticker!", "tag": "Groonga", "date": "2014-11-16 00:00:00"}, | ||
| {"_key": "Groonga is good!", "tag": "Groonga", "date": "2014-11-17 00:00:00"} | ||
| ] | ||
| [[0,0.0,0.0],5] | ||
| select Memos --filter true --drilldowns[tag].keys tag,date --drilldowns[tag].output_columns _key[0],_key[1],_nsubrecs --drilldowns[tag].sortby _value.tag._key,_value.date | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 5 | ||
| ], | ||
| [ | ||
| [ | ||
| "_id", | ||
| "UInt32" | ||
| ], | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ], | ||
| [ | ||
| "date", | ||
| "Time" | ||
| ], | ||
| [ | ||
| "tag", | ||
| "Tags" | ||
| ] | ||
| ], | ||
| [ | ||
| 1, | ||
| "Rroonga is fast!", | ||
| 1416150000.0, | ||
| "Rroonga" | ||
| ], | ||
| [ | ||
| 2, | ||
| "Mroonga is fast!", | ||
| 1416063600.0, | ||
| "Mroonga" | ||
| ], | ||
| [ | ||
| 3, | ||
| "Groonga is fast!", | ||
| 1416063600.0, | ||
| "Groonga" | ||
| ], | ||
| [ | ||
| 4, | ||
| "Groonga sticker!", | ||
| 1416063600.0, | ||
| "Groonga" | ||
| ], | ||
| [ | ||
| 5, | ||
| "Groonga is good!", | ||
| 1416150000.0, | ||
| "Groonga" | ||
| ] | ||
| ], | ||
| { | ||
| "tag": [ | ||
| [ | ||
| 4 | ||
| ], | ||
| [ | ||
| [ | ||
| "_key[0]", | ||
| null | ||
| ], | ||
| [ | ||
| "_key[1]", | ||
| null | ||
| ], | ||
| [ | ||
| "_nsubrecs", | ||
| "Int32" | ||
| ] | ||
| ], | ||
| [ | ||
| "Groonga", | ||
| 1416063600.0, | ||
| 2 | ||
| ], | ||
| [ | ||
| "Groonga", | ||
| 1416150000.0, | ||
| 1 | ||
| ], | ||
| [ | ||
| "Mroonga", | ||
| 1416063600.0, | ||
| 1 | ||
| ], | ||
| [ | ||
| "Rroonga", | ||
| 1416150000.0, | ||
| 1 | ||
| ] | ||
| ] | ||
| } | ||
| ] | ||
| ] |
20 changes: 20 additions & 0 deletions
20
test/command/suite/select/drilldowns/sortby/sub_record_column/multiple.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,20 @@ | ||
| table_create Tags TABLE_PAT_KEY ShortText | ||
|
|
||
| table_create Memos TABLE_HASH_KEY ShortText | ||
| column_create Memos tag COLUMN_SCALAR Tags | ||
| column_create Memos date COLUMN_SCALAR Time | ||
|
|
||
| load --table Memos | ||
| [ | ||
| {"_key": "Rroonga is fast!", "tag": "Rroonga", "date": "2014-11-17 00:00:00"}, | ||
| {"_key": "Mroonga is fast!", "tag": "Mroonga", "date": "2014-11-16 00:00:00"}, | ||
| {"_key": "Groonga is fast!", "tag": "Groonga", "date": "2014-11-16 00:00:00"}, | ||
| {"_key": "Groonga sticker!", "tag": "Groonga", "date": "2014-11-16 00:00:00"}, | ||
| {"_key": "Groonga is good!", "tag": "Groonga", "date": "2014-11-17 00:00:00"} | ||
| ] | ||
|
|
||
| select Memos \ | ||
| --filter true \ | ||
| --drilldowns[tag].keys tag,date \ | ||
| --drilldowns[tag].output_columns _key[0],_key[1],_nsubrecs \ | ||
| --drilldowns[tag].sortby _value.tag._key,_value.date |
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,55 @@ | ||
| table_create Users TABLE_HASH_KEY ShortText | ||
| [[0,0.0,0.0],true] | ||
| column_create Users name COLUMN_SCALAR|COMPRESS_ZLIB ShortText | ||
| [[0,0.0,0.0],true] | ||
| load --table Users | ||
| [ | ||
| {"_key": "alice", "name": "Alice"}, | ||
| {"_key": "kou", "name": "kou"}, | ||
| {"_key": "mori", "name": "森"} | ||
| ] | ||
| [[0,0.0,0.0],3] | ||
| select Users --sortby name | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 3 | ||
| ], | ||
| [ | ||
| [ | ||
| "_id", | ||
| "UInt32" | ||
| ], | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ], | ||
| [ | ||
| "name", | ||
| "ShortText" | ||
| ] | ||
| ], | ||
| [ | ||
| 1, | ||
| "alice", | ||
| "Alice" | ||
| ], | ||
| [ | ||
| 2, | ||
| "kou", | ||
| "kou" | ||
| ], | ||
| [ | ||
| 3, | ||
| "mori", | ||
| "森" | ||
| ] | ||
| ] | ||
| ] | ||
| ] |
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,11 @@ | ||
| table_create Users TABLE_HASH_KEY ShortText | ||
| column_create Users name COLUMN_SCALAR|COMPRESS_ZLIB ShortText | ||
|
|
||
| load --table Users | ||
| [ | ||
| {"_key": "alice", "name": "Alice"}, | ||
| {"_key": "kou", "name": "kou"}, | ||
| {"_key": "mori", "name": "森"} | ||
| ] | ||
|
|
||
| select Users --sortby name |
37 changes: 37 additions & 0 deletions
37
test/command/suite/select/sortby/geo/distance/limit.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,37 @@ | ||
| select LandMarks --sortby 'geo_distance(point, "0x0")' --limit 3 | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 11 | ||
| ], | ||
| [ | ||
| [ | ||
| "_id", | ||
| "UInt32" | ||
| ], | ||
| [ | ||
| "point", | ||
| "WGS84GeoPoint" | ||
| ] | ||
| ], | ||
| [ | ||
| 1, | ||
| "0x0" | ||
| ], | ||
| [ | ||
| 2, | ||
| "-1x1" | ||
| ], | ||
| [ | ||
| 3, | ||
| "1x2" | ||
| ] | ||
| ] | ||
| ] | ||
| ] |
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,3 @@ | ||
| #@include fixture/geo/sort/init.grn | ||
|
|
||
| select LandMarks --sortby 'geo_distance(point, "0x0")' --limit 3 |
Oops, something went wrong.