Kouhei Sutou
null+****@clear*****
Mon Nov 24 21:31:00 JST 2014
Kouhei Sutou 2014-11-24 21:31:00 +0900 (Mon, 24 Nov 2014) New Revision: d1434951380c34b775b751de753b4f1f8ed42aa9 https://github.com/groonga/groonga/commit/d1434951380c34b775b751de753b4f1f8ed42aa9 Message: Add a test for group by reference vector Added files: test/command/suite/select/drilldown/plain/reference_vector.expected test/command/suite/select/drilldown/plain/reference_vector.test Added: test/command/suite/select/drilldown/plain/reference_vector.expected (+65 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/drilldown/plain/reference_vector.expected 2014-11-24 21:31:00 +0900 (138caf5) @@ -0,0 +1,65 @@ +table_create Tags TABLE_HASH_KEY ShortText +[[0,0.0,0.0],true] +table_create Memos TABLE_HASH_KEY ShortText +[[0,0.0,0.0],true] +column_create Memos date COLUMN_SCALAR Time +[[0,0.0,0.0],true] +column_create Memos tags COLUMN_VECTOR Tags +[[0,0.0,0.0],true] +load --table Memos +[ +{"_key": "Groonga is fast!", "tags": ["Groonga"]}, +{"_key": "Mroonga is fast!", "tags": ["Mroonga", "Groonga"]}, +{"_key": "Groonga sticker!", "tags": ["Groonga"]}, +{"_key": "Rroonga is fast!", "tags": ["Rroonga", "Groonga"]}, +{"_key": "Groonga is good!", "tags": ["Groonga"]} +] +[[0,0.0,0.0],5] +select Memos --limit 0 --output_columns _id --drilldown tags --drilldown_output_columns _key,_nsubrecs --drilldown_sortby -_nsubrecs,_id +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 5 + ], + [ + [ + "_id", + "UInt32" + ] + ] + ], + [ + [ + 3 + ], + [ + [ + "_key", + "ShortText" + ], + [ + "_nsubrecs", + "Int32" + ] + ], + [ + "Groonga", + 5 + ], + [ + "Mroonga", + 1 + ], + [ + "Rroonga", + 1 + ] + ] + ] +] Added: test/command/suite/select/drilldown/plain/reference_vector.test (+21 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/drilldown/plain/reference_vector.test 2014-11-24 21:31:00 +0900 (3a1d906) @@ -0,0 +1,21 @@ +table_create Tags TABLE_HASH_KEY ShortText + +table_create Memos TABLE_HASH_KEY ShortText +column_create Memos date COLUMN_SCALAR Time +column_create Memos tags COLUMN_VECTOR Tags + +load --table Memos +[ +{"_key": "Groonga is fast!", "tags": ["Groonga"]}, +{"_key": "Mroonga is fast!", "tags": ["Mroonga", "Groonga"]}, +{"_key": "Groonga sticker!", "tags": ["Groonga"]}, +{"_key": "Rroonga is fast!", "tags": ["Rroonga", "Groonga"]}, +{"_key": "Groonga is good!", "tags": ["Groonga"]} +] + +select Memos \ + --limit 0 \ + --output_columns _id \ + --drilldown tags \ + --drilldown_output_columns _key,_nsubrecs \ + --drilldown_sortby -_nsubrecs,_id -------------- next part -------------- HTML����������������������������...Download