Naoya Murakami
null+****@clear*****
Tue Jan 17 00:02:41 JST 2017
Naoya Murakami 2017-01-17 00:02:41 +0900 (Tue, 17 Jan 2017) New Revision: 255c04cc5920860b993f7ac0dc058d61e58939cc https://github.com/groonga/groonga/commit/255c04cc5920860b993f7ac0dc058d61e58939cc Merged b8c4ffd: Merge pull request #627 from naoa/dont-output-label-if-cant-sort Message: test: add nonexistent sort_keys case for drilldowns/slices Added files: test/command/suite/select/drilldowns/sort_keys/nonexistent/key.expected test/command/suite/select/drilldowns/sort_keys/nonexistent/key.test test/command/suite/select/drilldowns/sort_keys/nonexistent/multiple_drilldowns.test Copied files: test/command/suite/select/drilldowns/sort_keys/nonexistent/multiple_drilldowns.expected (from test/command/suite/select/slices/sort_keys.expected) test/command/suite/select/slices/sort_keys/nonexistent/key.expected (from test/command/suite/select/slices/sort_keys.expected) test/command/suite/select/slices/sort_keys/nonexistent/key.test (from test/command/suite/select/slices/sort_keys.test) test/command/suite/select/slices/sort_keys/nonexistent/multiple_slices.expected (from test/command/suite/select/slices/sort_keys.expected) test/command/suite/select/slices/sort_keys/nonexistent/multiple_slices.test (from test/command/suite/select/slices/sort_keys.test) Renamed files: test/command/suite/select/slices/sort_keys/sort_keys.expected (from test/command/suite/select/slices/sort_keys.expected) test/command/suite/select/slices/sort_keys/sort_keys.test (from test/command/suite/select/slices/sort_keys.test) Added: test/command/suite/select/drilldowns/sort_keys/nonexistent/key.expected (+76 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/drilldowns/sort_keys/nonexistent/key.expected 2017-01-17 00:02:41 +0900 (fcd67f5) @@ -0,0 +1,76 @@ +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 value COLUMN_SCALAR Int64 +[[0,0.0,0.0],true] +load --table Memos +[ +{"_key": "Groonga is fast!", "tag": "Groonga", "value": 10}, +{"_key": "Mroonga is fast!", "tag": "Mroonga", "value": 20}, +{"_key": "Groonga sticker!", "tag": "Groonga", "value": 40}, +{"_key": "Rroonga is fast!", "tag": "Rroonga", "value": 80} +] +[[0,0.0,0.0],4] +select Memos --drilldowns[tag].keys tag --drilldowns[tag].output_columns _key --drilldowns[tag].sort_keys noexistent +[ + [ + 0, + 0.0, + 0.0 + ], + [ + [ + [ + 4 + ], + [ + [ + "_id", + "UInt32" + ], + [ + "_key", + "ShortText" + ], + [ + "tag", + "Tags" + ], + [ + "value", + "Int64" + ] + ], + [ + 1, + "Groonga is fast!", + "Groonga", + 10 + ], + [ + 2, + "Mroonga is fast!", + "Mroonga", + 20 + ], + [ + 3, + "Groonga sticker!", + "Groonga", + 40 + ], + [ + 4, + "Rroonga is fast!", + "Rroonga", + 80 + ] + ], + { + } + ] +] +#|w| invalid sort key: <noexistent>: table:<(anonymous)> keys:<noexistent> Added: test/command/suite/select/drilldowns/sort_keys/nonexistent/key.test (+15 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/drilldowns/sort_keys/nonexistent/key.test 2017-01-17 00:02:41 +0900 (1a997bb) @@ -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 value COLUMN_SCALAR Int64 +load --table Memos +[ +{"_key": "Groonga is fast!", "tag": "Groonga", "value": 10}, +{"_key": "Mroonga is fast!", "tag": "Mroonga", "value": 20}, +{"_key": "Groonga sticker!", "tag": "Groonga", "value": 40}, +{"_key": "Rroonga is fast!", "tag": "Rroonga", "value": 80} +] +select Memos \ + --drilldowns[tag].keys tag \ + --drilldowns[tag].output_columns _key \ + --drilldowns[tag].sort_keys noexistent Copied: test/command/suite/select/drilldowns/sort_keys/nonexistent/multiple_drilldowns.expected (+32 -27) 52% =================================================================== --- test/command/suite/select/slices/sort_keys.expected 2017-01-14 20:11:17 +0900 (3f92798) +++ test/command/suite/select/drilldowns/sort_keys/nonexistent/multiple_drilldowns.expected 2017-01-17 00:02:41 +0900 (00ab3c4) @@ -2,19 +2,19 @@ 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 date COLUMN_SCALAR Time -[[0,0.0,0.0],true] column_create Memos tag COLUMN_SCALAR Tags [[0,0.0,0.0],true] +column_create Memos value COLUMN_SCALAR Int64 +[[0,0.0,0.0],true] load --table Memos [ -{"_key": "Groonga is fast!", "date": "2016-05-19 12:00:00", "tag": "Groonga"}, -{"_key": "Mroonga is fast!", "date": "2016-05-19 12:00:01", "tag": "Mroonga"}, -{"_key": "Groonga sticker!", "date": "2016-05-19 12:00:02", "tag": "Groonga"}, -{"_key": "Rroonga is fast!", "date": "2016-05-19 12:00:03", "tag": "Rroonga"} +{"_key": "Groonga is fast!", "tag": "Groonga", "value": 10}, +{"_key": "Mroonga is fast!", "tag": "Mroonga", "value": 20}, +{"_key": "Groonga sticker!", "tag": "Groonga", "value": 40}, +{"_key": "Rroonga is fast!", "tag": "Rroonga", "value": 80} ] [[0,0.0,0.0],4] -select Memos --slices[groonga].filter 'tag == "Groonga"' --slices[groonga].sort_keys 'date' --slices[groonga].output_columns '_key, date' +select Memos --drilldowns[tag].keys tag --drilldowns[tag].output_columns _key --drilldowns[tag].sort_keys noexistent --drilldowns[tag2].keys tag [ [ 0, @@ -36,43 +36,43 @@ select Memos --slices[groonga].filter 'tag == "Groonga"' --slices[groonga].s "ShortText" ], [ - "date", - "Time" - ], - [ "tag", "Tags" + ], + [ + "value", + "Int64" ] ], [ 1, "Groonga is fast!", - 1463626800.0, - "Groonga" + "Groonga", + 10 ], [ 2, "Mroonga is fast!", - 1463626801.0, - "Mroonga" + "Mroonga", + 20 ], [ 3, "Groonga sticker!", - 1463626802.0, - "Groonga" + "Groonga", + 40 ], [ 4, "Rroonga is fast!", - 1463626803.0, - "Rroonga" + "Rroonga", + 80 ] ], { - "groonga": [ + "tag2": [ [ - 2 + 3 ], [ [ @@ -80,19 +80,24 @@ select Memos --slices[groonga].filter 'tag == "Groonga"' --slices[groonga].s "ShortText" ], [ - "date", - "Time" + "_nsubrecs", + "Int32" ] ], [ - "Groonga is fast!", - 1463626800.0 + "Groonga", + 2 + ], + [ + "Mroonga", + 1 ], [ - "Groonga sticker!", - 1463626802.0 + "Rroonga", + 1 ] ] } ] ] +#|w| invalid sort key: <noexistent>: table:<(anonymous)> keys:<noexistent> Added: test/command/suite/select/drilldowns/sort_keys/nonexistent/multiple_drilldowns.test (+16 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/select/drilldowns/sort_keys/nonexistent/multiple_drilldowns.test 2017-01-17 00:02:41 +0900 (186eb58) @@ -0,0 +1,16 @@ +table_create Tags TABLE_PAT_KEY ShortText +table_create Memos TABLE_HASH_KEY ShortText +column_create Memos tag COLUMN_SCALAR Tags +column_create Memos value COLUMN_SCALAR Int64 +load --table Memos +[ +{"_key": "Groonga is fast!", "tag": "Groonga", "value": 10}, +{"_key": "Mroonga is fast!", "tag": "Mroonga", "value": 20}, +{"_key": "Groonga sticker!", "tag": "Groonga", "value": 40}, +{"_key": "Rroonga is fast!", "tag": "Rroonga", "value": 80} +] +select Memos \ + --drilldowns[tag].keys tag \ + --drilldowns[tag].output_columns _key \ + --drilldowns[tag].sort_keys noexistent \ + --drilldowns[tag2].keys tag Copied: test/command/suite/select/slices/sort_keys/nonexistent/key.expected (+2 -24) 75% =================================================================== --- test/command/suite/select/slices/sort_keys.expected 2017-01-14 20:11:17 +0900 (3f92798) +++ test/command/suite/select/slices/sort_keys/nonexistent/key.expected 2017-01-17 00:02:41 +0900 (090d4da) @@ -14,7 +14,7 @@ load --table Memos {"_key": "Rroonga is fast!", "date": "2016-05-19 12:00:03", "tag": "Rroonga"} ] [[0,0.0,0.0],4] -select Memos --slices[groonga].filter 'tag == "Groonga"' --slices[groonga].sort_keys 'date' --slices[groonga].output_columns '_key, date' +select Memos --slices[groonga].filter 'tag == "Groonga"' --slices[groonga].sort_keys 'nonexistent' --slices[groonga].output_columns '_key, date' [ [ 0, @@ -70,29 +70,7 @@ select Memos --slices[groonga].filter 'tag == "Groonga"' --slices[groonga].s ] ], { - "groonga": [ - [ - 2 - ], - [ - [ - "_key", - "ShortText" - ], - [ - "date", - "Time" - ] - ], - [ - "Groonga is fast!", - 1463626800.0 - ], - [ - "Groonga sticker!", - 1463626802.0 - ] - ] } ] ] +#|w| invalid sort key: <nonexistent>: table:<(anonymous)> keys:<nonexistent> Copied: test/command/suite/select/slices/sort_keys/nonexistent/key.test (+1 -1) 93% =================================================================== --- test/command/suite/select/slices/sort_keys.test 2017-01-14 20:11:17 +0900 (50735a3) +++ test/command/suite/select/slices/sort_keys/nonexistent/key.test 2017-01-17 00:02:41 +0900 (970c65c) @@ -14,5 +14,5 @@ load --table Memos select Memos \ --slices[groonga].filter 'tag == "Groonga"' \ - --slices[groonga].sort_keys 'date' \ + --slices[groonga].sort_keys 'nonexistent' \ --slices[groonga].output_columns '_key, date' Copied: test/command/suite/select/slices/sort_keys/nonexistent/multiple_slices.expected (+6 -9) 80% =================================================================== --- test/command/suite/select/slices/sort_keys.expected 2017-01-14 20:11:17 +0900 (3f92798) +++ test/command/suite/select/slices/sort_keys/nonexistent/multiple_slices.expected 2017-01-17 00:02:41 +0900 (f3f2723) @@ -14,7 +14,7 @@ load --table Memos {"_key": "Rroonga is fast!", "date": "2016-05-19 12:00:03", "tag": "Rroonga"} ] [[0,0.0,0.0],4] -select Memos --slices[groonga].filter 'tag == "Groonga"' --slices[groonga].sort_keys 'date' --slices[groonga].output_columns '_key, date' +select Memos --slices[groonga].filter 'tag == "Groonga"' --slices[groonga].sort_keys 'nonexistent' --slices[groonga].output_columns '_key, date' --slices[mroonga].filter 'tag == "Mroonga"' --slices[mroonga].sort_keys 'date' --slices[mroonga].output_columns '_key, date' [ [ 0, @@ -70,9 +70,9 @@ select Memos --slices[groonga].filter 'tag == "Groonga"' --slices[groonga].s ] ], { - "groonga": [ + "mroonga": [ [ - 2 + 1 ], [ [ @@ -85,14 +85,11 @@ select Memos --slices[groonga].filter 'tag == "Groonga"' --slices[groonga].s ] ], [ - "Groonga is fast!", - 1463626800.0 - ], - [ - "Groonga sticker!", - 1463626802.0 + "Mroonga is fast!", + 1463626801.0 ] ] } ] ] +#|w| invalid sort key: <nonexistent>: table:<(anonymous)> keys:<nonexistent> Copied: test/command/suite/select/slices/sort_keys/nonexistent/multiple_slices.test (+5 -2) 71% =================================================================== --- test/command/suite/select/slices/sort_keys.test 2017-01-14 20:11:17 +0900 (50735a3) +++ test/command/suite/select/slices/sort_keys/nonexistent/multiple_slices.test 2017-01-17 00:02:41 +0900 (1020e3e) @@ -14,5 +14,8 @@ load --table Memos select Memos \ --slices[groonga].filter 'tag == "Groonga"' \ - --slices[groonga].sort_keys 'date' \ - --slices[groonga].output_columns '_key, date' + --slices[groonga].sort_keys 'nonexistent' \ + --slices[groonga].output_columns '_key, date' \ + --slices[mroonga].filter 'tag == "Mroonga"' \ + --slices[mroonga].sort_keys 'date' \ + --slices[mroonga].output_columns '_key, date' Renamed: test/command/suite/select/slices/sort_keys/sort_keys.expected (+0 -0) 100% =================================================================== Renamed: test/command/suite/select/slices/sort_keys/sort_keys.test (+0 -0) 100% =================================================================== -------------- next part -------------- HTML����������������������������... ダウンロード