Kouhei Sutou
null+****@clear*****
Fri Jun 21 16:44:53 JST 2013
Kouhei Sutou 2013-06-21 16:44:53 +0900 (Fri, 21 Jun 2013) New Revision: 44bbedca56605f890d070e40b992df9430164595 https://github.com/groonga/groonga/commit/44bbedca56605f890d070e40b992df9430164595 Message: Add tests for "select --drilldown" Added files: test/command/suite/select/drilldown/multiple.expected test/command/suite/select/drilldown/multiple.test test/command/suite/select/drilldown/single.expected test/command/suite/select/drilldown/single.test Added: test/command/suite/select/drilldown/multiple.expected (+127 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/drilldown/multiple.expected 2013-06-21 16:44:53 +0900 (830e489) @@ -0,0 +1,127 @@ +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 ShortText +[[0,0.0,0.0],true] +load --table Memos +[ +{"_key": "groonga is fast!", "tag": "groonga", "date": "2013-06-21"}, +{"_key": "mroonga is fast!", "tag": "mroonga", "date": "2013-06-21"}, +{"_key": "groonga sticker!", "tag": "groonga", "date": "2013-06-22"}, +{"_key": "rroonga is fast!", "tag": "rroonga", "date": "2013-06-23"} +] +[[0,0.0,0.0],4] +select Memos --drilldown tag,date +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 4 + ], + [ + [ + "_id", + "UInt32" + ], + [ + "_key", + "ShortText" + ], + [ + "date", + "ShortText" + ], + [ + "tag", + "Tags" + ] + ], + [ + 1, + "groonga is fast!", + "2013-06-21", + "groonga" + ], + [ + 2, + "mroonga is fast!", + "2013-06-21", + "mroonga" + ], + [ + 3, + "groonga sticker!", + "2013-06-22", + "groonga" + ], + [ + 4, + "rroonga is fast!", + "2013-06-23", + "rroonga" + ] + ], + [ + [ + 3 + ], + [ + [ + "_key", + "ShortText" + ], + [ + "_nsubrecs", + "Int32" + ] + ], + [ + "groonga", + 2 + ], + [ + "mroonga", + 1 + ], + [ + "rroonga", + 1 + ] + ], + [ + [ + 3 + ], + [ + [ + "_key", + "ShortText" + ], + [ + "_nsubrecs", + "Int32" + ] + ], + [ + "2013-06-21", + 2 + ], + [ + "2013-06-22", + 1 + ], + [ + "2013-06-23", + 1 + ] + ] + ] +] Added: test/command/suite/select/drilldown/multiple.test (+15 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/drilldown/multiple.test 2013-06-21 16:44:53 +0900 (babe5e1) @@ -0,0 +1,15 @@ +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 ShortText + +load --table Memos +[ +{"_key": "groonga is fast!", "tag": "groonga", "date": "2013-06-21"}, +{"_key": "mroonga is fast!", "tag": "mroonga", "date": "2013-06-21"}, +{"_key": "groonga sticker!", "tag": "groonga", "date": "2013-06-22"}, +{"_key": "rroonga is fast!", "tag": "rroonga", "date": "2013-06-23"} +] + +select Memos --drilldown tag,date Added: test/command/suite/select/drilldown/single.expected (+90 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/drilldown/single.expected 2013-06-21 16:44:53 +0900 (79f28ce) @@ -0,0 +1,90 @@ +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] +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] +select Memos --drilldown tag +[ + [ + 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" + ] + ], + [ + [ + 3 + ], + [ + [ + "_key", + "ShortText" + ], + [ + "_nsubrecs", + "Int32" + ] + ], + [ + "groonga", + 2 + ], + [ + "mroonga", + 1 + ], + [ + "rroonga", + 1 + ] + ] + ] +] Added: test/command/suite/select/drilldown/single.test (+14 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/drilldown/single.test 2013-06-21 16:44:53 +0900 (4e73ed3) @@ -0,0 +1,14 @@ +table_create Tags TABLE_PAT_KEY ShortText + +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"} +] + +select Memos --drilldown tag -------------- next part -------------- HTML����������������������������...Download