Kouhei Sutou
null+****@clear*****
Sun Apr 10 22:09:42 JST 2016
Kouhei Sutou 2016-04-10 22:09:42 +0900 (Sun, 10 Apr 2016) New Revision: ecd06ca83fe6f696e1eedb9804ca217f64cc2b3d https://github.com/groonga/groonga/commit/ecd06ca83fe6f696e1eedb9804ca217f64cc2b3d Message: test select drilldown: sort property names It's for using the same expected result for command interface and HTTP interface. GitHub: fix #525 Reported by Naoya Murakami. Thanks!!! Removed files: test/command/suite/select/drilldown/labeled/table/unordered.expected test/command/suite/select/drilldown/labeled/table/unordered.test Modified files: test/command/suite/select/drilldown/labeled/table/cyclic.expected test/command/suite/select/drilldown/labeled/table/cyclic.test test/command/suite/select/drilldown/labeled/table/one.expected test/command/suite/select/drilldown/labeled/table/one.test test/command/suite/select/drilldown/labeled/table/two.expected test/command/suite/select/drilldown/labeled/table/two.test Modified: test/command/suite/select/drilldown/labeled/table/cyclic.expected (+1 -1) =================================================================== --- test/command/suite/select/drilldown/labeled/table/cyclic.expected 2016-04-10 22:08:38 +0900 (14c027b) +++ test/command/suite/select/drilldown/labeled/table/cyclic.expected 2016-04-10 22:09:42 +0900 (6df61bf) @@ -31,7 +31,7 @@ load --table Categories {"_key": "Ruby", "sub_category": "Programming language"} ] [[0,0.0,0.0],2] -select Memos --drilldown[tag].keys tag --drilldown[tag].output_columns _key,_nsubrecs,category --drilldown[category].table sub_category --drilldown[category].keys _key --drilldown[category].output_columns _key,_nsubrecs --drilldown[sub_category].table category --drilldown[sub_category].keys sub_category --drilldown[sub_category].output_columns _key,_nsubrecs +select Memos --drilldown[category].table sub_category --drilldown[category].keys _key --drilldown[category].output_columns _key,_nsubrecs --drilldown[sub_category].table category --drilldown[sub_category].keys sub_category --drilldown[sub_category].output_columns _key,_nsubrecs --drilldown[tag].keys tag --drilldown[tag].output_columns _key,_nsubrecs,category [ [ 0, Modified: test/command/suite/select/drilldown/labeled/table/cyclic.test (+3 -3) =================================================================== --- test/command/suite/select/drilldown/labeled/table/cyclic.test 2016-04-10 22:08:38 +0900 (e0368ff) +++ test/command/suite/select/drilldown/labeled/table/cyclic.test 2016-04-10 22:09:42 +0900 (659780a) @@ -29,11 +29,11 @@ load --table Categories ] select Memos \ - --drilldown[tag].keys tag \ - --drilldown[tag].output_columns _key,_nsubrecs,category \ --drilldown[category].table sub_category \ --drilldown[category].keys _key \ --drilldown[category].output_columns _key,_nsubrecs \ --drilldown[sub_category].table category \ --drilldown[sub_category].keys sub_category \ - --drilldown[sub_category].output_columns _key,_nsubrecs + --drilldown[sub_category].output_columns _key,_nsubrecs \ + --drilldown[tag].keys tag \ + --drilldown[tag].output_columns _key,_nsubrecs,category Modified: test/command/suite/select/drilldown/labeled/table/one.expected (+24 -24) =================================================================== --- test/command/suite/select/drilldown/labeled/table/one.expected 2016-04-10 22:08:38 +0900 (d7978c2) +++ test/command/suite/select/drilldown/labeled/table/one.expected 2016-04-10 22:09:42 +0900 (89100e7) @@ -21,7 +21,7 @@ load --table Tags {"_key": "Rroonga", "category": "Ruby"} ] [[0,0.0,0.0],3] -select Memos --drilldown[tag].keys tag --drilldown[tag].output_columns _key,_nsubrecs,category --drilldown[category].table tag --drilldown[category].keys category --drilldown[category].output_columns _key,_nsubrecs +select Memos --drilldown[category].table tag --drilldown[category].keys category --drilldown[category].output_columns _key,_nsubrecs --drilldown[tag].keys tag --drilldown[tag].output_columns _key,_nsubrecs,category [ [ 0, @@ -69,9 +69,9 @@ select Memos --drilldown[tag].keys tag --drilldown[tag].output_columns _key, ] ], { - "tag": [ + "category": [ [ - 3 + 2 ], [ [ @@ -81,31 +81,20 @@ select Memos --drilldown[tag].keys tag --drilldown[tag].output_columns _key, [ "_nsubrecs", "Int32" - ], - [ - "category", - "ShortText" ] ], [ - "Groonga", - 2, - "C/C++" - ], - [ - "Mroonga", - 1, - "C/C++" + "C/C++", + 2 ], [ - "Rroonga", - 1, - "Ruby" + "Ruby", + 1 ] ], - "category": [ + "tag": [ [ - 2 + 3 ], [ [ @@ -115,15 +104,26 @@ select Memos --drilldown[tag].keys tag --drilldown[tag].output_columns _key, [ "_nsubrecs", "Int32" + ], + [ + "category", + "ShortText" ] ], [ - "C/C++", - 2 + "Groonga", + 2, + "C/C++" ], [ - "Ruby", - 1 + "Mroonga", + 1, + "C/C++" + ], + [ + "Rroonga", + 1, + "Ruby" ] ] } Modified: test/command/suite/select/drilldown/labeled/table/one.test (+3 -3) =================================================================== --- test/command/suite/select/drilldown/labeled/table/one.test 2016-04-10 22:08:38 +0900 (ef66aaa) +++ test/command/suite/select/drilldown/labeled/table/one.test 2016-04-10 22:09:42 +0900 (829e40c) @@ -20,8 +20,8 @@ load --table Tags ] select Memos \ - --drilldown[tag].keys tag \ - --drilldown[tag].output_columns _key,_nsubrecs,category \ --drilldown[category].table tag \ --drilldown[category].keys category \ - --drilldown[category].output_columns _key,_nsubrecs + --drilldown[category].output_columns _key,_nsubrecs \ + --drilldown[tag].keys tag \ + --drilldown[tag].output_columns _key,_nsubrecs,category Modified: test/command/suite/select/drilldown/labeled/table/two.expected (+32 -32) =================================================================== --- test/command/suite/select/drilldown/labeled/table/two.expected 2016-04-10 22:08:38 +0900 (3566f8f) +++ test/command/suite/select/drilldown/labeled/table/two.expected 2016-04-10 22:09:42 +0900 (ab76e8d) @@ -31,7 +31,7 @@ load --table Categories {"_key": "Ruby", "sub_category": "Programming language"} ] [[0,0.0,0.0],2] -select Memos --drilldown[tag].keys tag --drilldown[tag].output_columns _key,_nsubrecs,category --drilldown[category].table tag --drilldown[category].keys category --drilldown[category].output_columns _key,_nsubrecs,sub_category --drilldown[sub_category].table category --drilldown[sub_category].keys sub_category --drilldown[sub_category].output_columns _key,_nsubrecs +select Memos --drilldown[category].table tag --drilldown[category].keys category --drilldown[category].output_columns _key,_nsubrecs,sub_category --drilldown[sub_category].table category --drilldown[sub_category].keys sub_category --drilldown[sub_category].output_columns _key,_nsubrecs --drilldown[tag].keys tag --drilldown[tag].output_columns _key,_nsubrecs,category [ [ 0, @@ -79,9 +79,9 @@ select Memos --drilldown[tag].keys tag --drilldown[tag].output_columns _key, ] ], { - "tag": [ + "category": [ [ - 3 + 2 ], [ [ @@ -93,29 +93,24 @@ select Memos --drilldown[tag].keys tag --drilldown[tag].output_columns _key, "Int32" ], [ - "category", - "Categories" + "sub_category", + "ShortText" ] ], [ - "Groonga", + "C/C++", 2, - "C/C++" - ], - [ - "Mroonga", - 1, - "C/C++" + "Programming language" ], [ - "Rroonga", + "Ruby", 1, - "Ruby" + "Programming language" ] ], - "category": [ + "sub_category": [ [ - 2 + 1 ], [ [ @@ -125,26 +120,16 @@ select Memos --drilldown[tag].keys tag --drilldown[tag].output_columns _key, [ "_nsubrecs", "Int32" - ], - [ - "sub_category", - "ShortText" ] ], [ - "C/C++", - 2, - "Programming language" - ], - [ - "Ruby", - 1, - "Programming language" + "Programming language", + 2 ] ], - "sub_category": [ + "tag": [ [ - 1 + 3 ], [ [ @@ -154,11 +139,26 @@ select Memos --drilldown[tag].keys tag --drilldown[tag].output_columns _key, [ "_nsubrecs", "Int32" + ], + [ + "category", + "Categories" ] ], [ - "Programming language", - 2 + "Groonga", + 2, + "C/C++" + ], + [ + "Mroonga", + 1, + "C/C++" + ], + [ + "Rroonga", + 1, + "Ruby" ] ] } Modified: test/command/suite/select/drilldown/labeled/table/two.test (+3 -3) =================================================================== --- test/command/suite/select/drilldown/labeled/table/two.test 2016-04-10 22:08:38 +0900 (5cc9b17) +++ test/command/suite/select/drilldown/labeled/table/two.test 2016-04-10 22:09:42 +0900 (2be63ad) @@ -29,11 +29,11 @@ load --table Categories ] select Memos \ - --drilldown[tag].keys tag \ - --drilldown[tag].output_columns _key,_nsubrecs,category \ --drilldown[category].table tag \ --drilldown[category].keys category \ --drilldown[category].output_columns _key,_nsubrecs,sub_category \ --drilldown[sub_category].table category \ --drilldown[sub_category].keys sub_category \ - --drilldown[sub_category].output_columns _key,_nsubrecs + --drilldown[sub_category].output_columns _key,_nsubrecs \ + --drilldown[tag].keys tag \ + --drilldown[tag].output_columns _key,_nsubrecs,category Deleted: test/command/suite/select/drilldown/labeled/table/unordered.expected (+0 -166) 100644 =================================================================== --- test/command/suite/select/drilldown/labeled/table/unordered.expected 2016-04-10 22:08:38 +0900 (2076bd6) +++ /dev/null @@ -1,166 +0,0 @@ -table_create Categories TABLE_PAT_KEY ShortText -[[0,0.0,0.0],true] -column_create Categories sub_category COLUMN_SCALAR ShortText -[[0,0.0,0.0],true] -table_create Tags TABLE_PAT_KEY ShortText -[[0,0.0,0.0],true] -column_create Tags category COLUMN_SCALAR Categories -[[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] -load --table Memos -[ -{"_key": "Groonga is fast!", "tag": "Groonga"}, -{"_key": "Mroonga is fast!", "tag": "Mroonga"}, -{"_key": "Groonga sticker!", "tag": "Groonga"}, -{"_key": "Rroonga is fast!", "tag": "Rroonga"} -] -[[0,0.0,0.0],4] -load --table Tags -[ -{"_key": "Groonga", "category": "C/C++"}, -{"_key": "Mroonga", "category": "C/C++"}, -{"_key": "Rroonga", "category": "Ruby"} -] -[[0,0.0,0.0],3] -load --table Categories -[ -{"_key": "C/C++", "sub_category": "Programming language"}, -{"_key": "Ruby", "sub_category": "Programming language"} -] -[[0,0.0,0.0],2] -select Memos --drilldown[tag].keys tag --drilldown[tag].output_columns _key,_nsubrecs,category --drilldown[sub_category].table category --drilldown[sub_category].keys sub_category --drilldown[sub_category].output_columns _key,_nsubrecs --drilldown[category].table tag --drilldown[category].keys category --drilldown[category].output_columns _key,_nsubrecs,sub_category -[ - [ - 0, - 0.0, - 0.0 - ], - [ - [ - [ - 4 - ], - [ - [ - "_id", - "UInt32" - ], - [ - "_key", - "ShortText" - ], - [ - "tag", - "Tags" - ] - ], - [ - 1, - "Groonga is fast!", - "Groonga" - ], - [ - 2, - "Mroonga is fast!", - "Mroonga" - ], - [ - 3, - "Groonga sticker!", - "Groonga" - ], - [ - 4, - "Rroonga is fast!", - "Rroonga" - ] - ], - { - "tag": [ - [ - 3 - ], - [ - [ - "_key", - "ShortText" - ], - [ - "_nsubrecs", - "Int32" - ], - [ - "category", - "Categories" - ] - ], - [ - "Groonga", - 2, - "C/C++" - ], - [ - "Mroonga", - 1, - "C/C++" - ], - [ - "Rroonga", - 1, - "Ruby" - ] - ], - "sub_category": [ - [ - 1 - ], - [ - [ - "_key", - "ShortText" - ], - [ - "_nsubrecs", - "Int32" - ] - ], - [ - "Programming language", - 2 - ] - ], - "category": [ - [ - 2 - ], - [ - [ - "_key", - "ShortText" - ], - [ - "_nsubrecs", - "Int32" - ], - [ - "sub_category", - "ShortText" - ] - ], - [ - "C/C++", - 2, - "Programming language" - ], - [ - "Ruby", - 1, - "Programming language" - ] - ] - } - ] -] Deleted: test/command/suite/select/drilldown/labeled/table/unordered.test (+0 -39) 100644 =================================================================== --- test/command/suite/select/drilldown/labeled/table/unordered.test 2016-04-10 22:08:38 +0900 (1657bea) +++ /dev/null @@ -1,39 +0,0 @@ -table_create Categories TABLE_PAT_KEY ShortText -column_create Categories sub_category COLUMN_SCALAR ShortText - -table_create Tags TABLE_PAT_KEY ShortText -column_create Tags category COLUMN_SCALAR Categories - -table_create Memos TABLE_HASH_KEY ShortText -column_create Memos tag COLUMN_SCALAR Tags - -load --table Memos -[ -{"_key": "Groonga is fast!", "tag": "Groonga"}, -{"_key": "Mroonga is fast!", "tag": "Mroonga"}, -{"_key": "Groonga sticker!", "tag": "Groonga"}, -{"_key": "Rroonga is fast!", "tag": "Rroonga"} -] - -load --table Tags -[ -{"_key": "Groonga", "category": "C/C++"}, -{"_key": "Mroonga", "category": "C/C++"}, -{"_key": "Rroonga", "category": "Ruby"} -] - -load --table Categories -[ -{"_key": "C/C++", "sub_category": "Programming language"}, -{"_key": "Ruby", "sub_category": "Programming language"} -] - -select Memos \ - --drilldown[tag].keys tag \ - --drilldown[tag].output_columns _key,_nsubrecs,category \ - --drilldown[sub_category].table category \ - --drilldown[sub_category].keys sub_category \ - --drilldown[sub_category].output_columns _key,_nsubrecs \ - --drilldown[category].table tag \ - --drilldown[category].keys category \ - --drilldown[category].output_columns _key,_nsubrecs,sub_category -------------- next part -------------- HTML����������������������������... ダウンロード