Kouhei Sutou
null+****@clear*****
Mon Jan 19 18:41:32 JST 2015
Kouhei Sutou 2015-01-19 18:41:32 +0900 (Mon, 19 Jan 2015) New Revision: d352b7dcb6a24076bf048c118f6317f2a2a3a473 https://github.com/groonga/groonga/commit/d352b7dcb6a24076bf048c118f6317f2a2a3a473 Message: test: add a test for max in drilldown Added files: test/command/suite/select/drilldown/labeled/calc_types/max.expected test/command/suite/select/drilldown/labeled/calc_types/max.test Added: test/command/suite/select/drilldown/labeled/calc_types/max.expected (+83 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/drilldown/labeled/calc_types/max.expected 2015-01-19 18:41:32 +0900 (f7fb2ef) @@ -0,0 +1,83 @@ +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 priority COLUMN_SCALAR Int64 +[[0,0.0,0.0],true] +load --table Memos +[ +{"_key": "Groonga1", "tag": "Groonga", "priority": 10}, +{"_key": "Groonga2", "tag": "Groonga", "priority": 20}, +{"_key": "Groonga3", "tag": "Groonga", "priority": 40}, +{"_key": "Mroonga1", "tag": "Mroonga", "priority": 50}, +{"_key": "Mroonga2", "tag": "Mroonga", "priority": 25}, +{"_key": "Mroonga3", "tag": "Mroonga", "priority": 10}, +{"_key": "Rroonga1", "tag": "Rroonga", "priority": 25}, +{"_key": "Rroonga2", "tag": "Rroonga", "priority": -25}, +{"_key": "Rroonga3", "tag": "Rroonga", "priority": 0} +] +[[0,0.0,0.0],9] +select Memos --limit 0 --drilldown[tag].keys tag --drilldown[tag].calc_types MAX --drilldown[tag].calc_target priority --drilldown[tag].output_columns _key,_max +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 9 + ], + [ + [ + "_id", + "UInt32" + ], + [ + "_key", + "ShortText" + ], + [ + "priority", + "Int64" + ], + [ + "tag", + "Tags" + ] + ] + ], + { + "tag": [ + [ + 3 + ], + [ + [ + "_key", + "ShortText" + ], + [ + "_max", + "Int64" + ] + ], + [ + "Groonga", + 40 + ], + [ + "Mroonga", + 50 + ], + [ + "Rroonga", + 25 + ] + ] + } + ] +] Added: test/command/suite/select/drilldown/labeled/calc_types/max.test (+25 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/drilldown/labeled/calc_types/max.test 2015-01-19 18:41:32 +0900 (7b13e44) @@ -0,0 +1,25 @@ +table_create Tags TABLE_PAT_KEY ShortText + +table_create Memos TABLE_HASH_KEY ShortText +column_create Memos tag COLUMN_SCALAR Tags +column_create Memos priority COLUMN_SCALAR Int64 + +load --table Memos +[ +{"_key": "Groonga1", "tag": "Groonga", "priority": 10}, +{"_key": "Groonga2", "tag": "Groonga", "priority": 20}, +{"_key": "Groonga3", "tag": "Groonga", "priority": 40}, +{"_key": "Mroonga1", "tag": "Mroonga", "priority": 50}, +{"_key": "Mroonga2", "tag": "Mroonga", "priority": 25}, +{"_key": "Mroonga3", "tag": "Mroonga", "priority": 10}, +{"_key": "Rroonga1", "tag": "Rroonga", "priority": 25}, +{"_key": "Rroonga2", "tag": "Rroonga", "priority": -25}, +{"_key": "Rroonga3", "tag": "Rroonga", "priority": 0} +] + +select Memos \ + --limit 0 \ + --drilldown[tag].keys tag \ + --drilldown[tag].calc_types MAX \ + --drilldown[tag].calc_target priority \ + --drilldown[tag].output_columns _key,_max -------------- next part -------------- HTML����������������������������...Descargar