Kouhei Sutou
null+****@clear*****
Mon Jul 18 22:55:32 JST 2016
Kouhei Sutou 2016-07-18 22:55:32 +0900 (Mon, 18 Jul 2016) New Revision: e321d0df7c45f962d3329d11e3c40af487bbe184 https://github.com/groonga/groonga/commit/e321d0df7c45f962d3329d11e3c40af487bbe184 Message: vector_slice test: use more meaningful test values Modified files: test/command/suite/select/function/vector/vector_slice/from.expected test/command/suite/select/function/vector/vector_slice/from.test test/command/suite/select/function/vector/vector_slice/negative_from.expected test/command/suite/select/function/vector/vector_slice/negative_from.test test/command/suite/select/function/vector/vector_slice/negative_length.expected test/command/suite/select/function/vector/vector_slice/negative_length.test test/command/suite/select/function/vector/vector_slice/over_length.expected test/command/suite/select/function/vector/vector_slice/over_length.test test/command/suite/select/function/vector/vector_slice/reference_vector.expected test/command/suite/select/function/vector/vector_slice/reference_vector.test test/command/suite/select/function/vector/vector_slice/vector.expected test/command/suite/select/function/vector/vector_slice/vector.test test/command/suite/select/function/vector/vector_slice/weight_reference_vector.expected test/command/suite/select/function/vector/vector_slice/weight_reference_vector.test Modified: test/command/suite/select/function/vector/vector_slice/from.expected (+6 -4) =================================================================== --- test/command/suite/select/function/vector/vector_slice/from.expected 2016-07-18 22:42:33 +0900 (f82bd7e) +++ test/command/suite/select/function/vector/vector_slice/from.expected 2016-07-18 22:55:32 +0900 (f99893a) @@ -6,12 +6,12 @@ column_create Memos tags COLUMN_VECTOR ShortText [[0,0.0,0.0],true] load --table Memos [ -{"_key": "Groonga", "tags": ["Groonga"]}, -{"_key": "Rroonga", "tags": ["Groonga", "Ruby"]}, +{"_key": "Groonga", "tags": ["Groonga", "Full text search"]}, +{"_key": "Rroonga", "tags": ["Groonga", "Full text search", "Ruby"]}, {"_key": "Nothing"} ] [[0,0.0,0.0],3] -select Memos --output_columns 'tags, vector_slice(tags, 1, 1)' +select Memos --output_columns 'tags, vector_slice(tags, 2, 1)' [ [ 0, @@ -35,7 +35,8 @@ select Memos --output_columns 'tags, vector_slice(tags, 1, 1)' ], [ [ - "Groonga" + "Groonga", + "Full text search" ], [ @@ -44,6 +45,7 @@ select Memos --output_columns 'tags, vector_slice(tags, 1, 1)' [ [ "Groonga", + "Full text search", "Ruby" ], [ Modified: test/command/suite/select/function/vector/vector_slice/from.test (+3 -3) =================================================================== --- test/command/suite/select/function/vector/vector_slice/from.test 2016-07-18 22:42:33 +0900 (06b9f5d) +++ test/command/suite/select/function/vector/vector_slice/from.test 2016-07-18 22:55:32 +0900 (dc48b66) @@ -5,10 +5,10 @@ column_create Memos tags COLUMN_VECTOR ShortText load --table Memos [ -{"_key": "Groonga", "tags": ["Groonga"]}, -{"_key": "Rroonga", "tags": ["Groonga", "Ruby"]}, +{"_key": "Groonga", "tags": ["Groonga", "Full text search"]}, +{"_key": "Rroonga", "tags": ["Groonga", "Full text search", "Ruby"]}, {"_key": "Nothing"} ] select Memos \ - --output_columns 'tags, vector_slice(tags, 1, 1)' + --output_columns 'tags, vector_slice(tags, 2, 1)' Modified: test/command/suite/select/function/vector/vector_slice/negative_from.expected (+7 -5) =================================================================== --- test/command/suite/select/function/vector/vector_slice/negative_from.expected 2016-07-18 22:42:33 +0900 (795e1ba) +++ test/command/suite/select/function/vector/vector_slice/negative_from.expected 2016-07-18 22:55:32 +0900 (27ae308) @@ -6,12 +6,12 @@ column_create Memos tags COLUMN_VECTOR ShortText [[0,0.0,0.0],true] load --table Memos [ -{"_key": "Groonga", "tags": ["Groonga"]}, -{"_key": "Rroonga", "tags": ["Groonga", "Ruby"]}, +{"_key": "Groonga", "tags": ["Groonga", "Full text search"]}, +{"_key": "Rroonga", "tags": ["Groonga", "Full text search", "Ruby"]}, {"_key": "Nothing"} ] [[0,0.0,0.0],3] -select Memos --output_columns 'tags, vector_slice(tags, -1, 1)' +select Memos --output_columns 'tags, vector_slice(tags, -2, 1)' [ [ 0, @@ -35,7 +35,8 @@ select Memos --output_columns 'tags, vector_slice(tags, -1, 1)' ], [ [ - "Groonga" + "Groonga", + "Full text search" ], [ "Groonga" @@ -44,10 +45,11 @@ select Memos --output_columns 'tags, vector_slice(tags, -1, 1)' [ [ "Groonga", + "Full text search", "Ruby" ], [ - "Ruby" + "Full text search" ] ], [ Modified: test/command/suite/select/function/vector/vector_slice/negative_from.test (+3 -3) =================================================================== --- test/command/suite/select/function/vector/vector_slice/negative_from.test 2016-07-18 22:42:33 +0900 (64e5490) +++ test/command/suite/select/function/vector/vector_slice/negative_from.test 2016-07-18 22:55:32 +0900 (b42017d) @@ -5,10 +5,10 @@ column_create Memos tags COLUMN_VECTOR ShortText load --table Memos [ -{"_key": "Groonga", "tags": ["Groonga"]}, -{"_key": "Rroonga", "tags": ["Groonga", "Ruby"]}, +{"_key": "Groonga", "tags": ["Groonga", "Full text search"]}, +{"_key": "Rroonga", "tags": ["Groonga", "Full text search", "Ruby"]}, {"_key": "Nothing"} ] select Memos \ - --output_columns 'tags, vector_slice(tags, -1, 1)' + --output_columns 'tags, vector_slice(tags, -2, 1)' Modified: test/command/suite/select/function/vector/vector_slice/negative_length.expected (+8 -6) =================================================================== --- test/command/suite/select/function/vector/vector_slice/negative_length.expected 2016-07-18 22:42:33 +0900 (46d4f91) +++ test/command/suite/select/function/vector/vector_slice/negative_length.expected 2016-07-18 22:55:32 +0900 (8829780) @@ -6,12 +6,12 @@ column_create Memos tags COLUMN_VECTOR ShortText [[0,0.0,0.0],true] load --table Memos [ -{"_key": "Groonga", "tags": ["Groonga"]}, -{"_key": "Rroonga", "tags": ["Groonga", "Ruby"]}, +{"_key": "Groonga", "tags": ["Groonga", "Full text search"]}, +{"_key": "Rroonga", "tags": ["Groonga", "Full text search", "Ruby"]}, {"_key": "Nothing"} ] [[0,0.0,0.0],3] -select Memos --output_columns 'tags, vector_slice(tags, 0, -1)' +select Memos --output_columns 'tags, vector_slice(tags, 1, -2)' [ [ 0, @@ -35,19 +35,21 @@ select Memos --output_columns 'tags, vector_slice(tags, 0, -1)' ], [ [ - "Groonga" + "Groonga", + "Full text search" ], [ - "Groonga" + "Full text search" ] ], [ [ "Groonga", + "Full text search", "Ruby" ], [ - "Groonga", + "Full text search", "Ruby" ] ], Modified: test/command/suite/select/function/vector/vector_slice/negative_length.test (+3 -3) =================================================================== --- test/command/suite/select/function/vector/vector_slice/negative_length.test 2016-07-18 22:42:33 +0900 (6c4a54d) +++ test/command/suite/select/function/vector/vector_slice/negative_length.test 2016-07-18 22:55:32 +0900 (1f84aeb) @@ -5,10 +5,10 @@ column_create Memos tags COLUMN_VECTOR ShortText load --table Memos [ -{"_key": "Groonga", "tags": ["Groonga"]}, -{"_key": "Rroonga", "tags": ["Groonga", "Ruby"]}, +{"_key": "Groonga", "tags": ["Groonga", "Full text search"]}, +{"_key": "Rroonga", "tags": ["Groonga", "Full text search", "Ruby"]}, {"_key": "Nothing"} ] select Memos \ - --output_columns 'tags, vector_slice(tags, 0, -1)' + --output_columns 'tags, vector_slice(tags, 1, -2)' Modified: test/command/suite/select/function/vector/vector_slice/over_length.expected (+8 -6) =================================================================== --- test/command/suite/select/function/vector/vector_slice/over_length.expected 2016-07-18 22:42:33 +0900 (e4e93a9) +++ test/command/suite/select/function/vector/vector_slice/over_length.expected 2016-07-18 22:55:32 +0900 (77a81e4) @@ -6,12 +6,12 @@ column_create Memos tags COLUMN_VECTOR ShortText [[0,0.0,0.0],true] load --table Memos [ -{"_key": "Groonga", "tags": ["Groonga"]}, -{"_key": "Rroonga", "tags": ["Groonga", "Ruby"]}, +{"_key": "Groonga", "tags": ["Groonga", "Full text search"]}, +{"_key": "Rroonga", "tags": ["Groonga", "Full text search", "Ruby"]}, {"_key": "Nothing"} ] [[0,0.0,0.0],3] -select Memos --output_columns 'tags, vector_slice(tags, 0, 2)' +select Memos --output_columns 'tags, vector_slice(tags, 1, 2)' [ [ 0, @@ -35,19 +35,21 @@ select Memos --output_columns 'tags, vector_slice(tags, 0, 2)' ], [ [ - "Groonga" + "Groonga", + "Full text search" ], [ - "Groonga" + "Full text search" ] ], [ [ "Groonga", + "Full text search", "Ruby" ], [ - "Groonga", + "Full text search", "Ruby" ] ], Modified: test/command/suite/select/function/vector/vector_slice/over_length.test (+3 -3) =================================================================== --- test/command/suite/select/function/vector/vector_slice/over_length.test 2016-07-18 22:42:33 +0900 (ef1c06e) +++ test/command/suite/select/function/vector/vector_slice/over_length.test 2016-07-18 22:55:32 +0900 (435da5a) @@ -5,10 +5,10 @@ column_create Memos tags COLUMN_VECTOR ShortText load --table Memos [ -{"_key": "Groonga", "tags": ["Groonga"]}, -{"_key": "Rroonga", "tags": ["Groonga", "Ruby"]}, +{"_key": "Groonga", "tags": ["Groonga", "Full text search"]}, +{"_key": "Rroonga", "tags": ["Groonga", "Full text search", "Ruby"]}, {"_key": "Nothing"} ] select Memos \ - --output_columns 'tags, vector_slice(tags, 0, 2)' + --output_columns 'tags, vector_slice(tags, 1, 2)' Modified: test/command/suite/select/function/vector/vector_slice/reference_vector.expected (+11 -7) =================================================================== --- test/command/suite/select/function/vector/vector_slice/reference_vector.expected 2016-07-18 22:42:33 +0900 (dca288f) +++ test/command/suite/select/function/vector/vector_slice/reference_vector.expected 2016-07-18 22:55:32 +0900 (dbf5a82) @@ -8,12 +8,12 @@ column_create Memos tags COLUMN_VECTOR Tags [[0,0.0,0.0],true] load --table Memos [ -{"_key": "Groonga", "tags": ["Groonga"]}, -{"_key": "Rroonga", "tags": ["Groonga", "Ruby"]}, +{"_key": "Groonga", "tags": ["Groonga", "Full text search"]}, +{"_key": "Rroonga", "tags": ["Groonga", "Full text search", "Ruby", "Library"]}, {"_key": "Nothing"} ] [[0,0.0,0.0],3] -select Memos --output_columns 'tags, vector_slice(tags, 0, 1)' +select Memos --output_columns 'tags, vector_slice(tags, 1, 2)' [ [ 0, @@ -37,19 +37,23 @@ select Memos --output_columns 'tags, vector_slice(tags, 0, 1)' ], [ [ - "Groonga" + "Groonga", + "Full text search" ], [ - "Groonga" + "Full text search" ] ], [ [ "Groonga", - "Ruby" + "Full text search", + "Ruby", + "Library" ], [ - "Groonga" + "Full text search", + "Ruby" ] ], [ Modified: test/command/suite/select/function/vector/vector_slice/reference_vector.test (+3 -3) =================================================================== --- test/command/suite/select/function/vector/vector_slice/reference_vector.test 2016-07-18 22:42:33 +0900 (245fc54) +++ test/command/suite/select/function/vector/vector_slice/reference_vector.test 2016-07-18 22:55:32 +0900 (e5d67ff) @@ -7,10 +7,10 @@ column_create Memos tags COLUMN_VECTOR Tags load --table Memos [ -{"_key": "Groonga", "tags": ["Groonga"]}, -{"_key": "Rroonga", "tags": ["Groonga", "Ruby"]}, +{"_key": "Groonga", "tags": ["Groonga", "Full text search"]}, +{"_key": "Rroonga", "tags": ["Groonga", "Full text search", "Ruby", "Library"]}, {"_key": "Nothing"} ] select Memos \ - --output_columns 'tags, vector_slice(tags, 0, 1)' + --output_columns 'tags, vector_slice(tags, 1, 2)' Modified: test/command/suite/select/function/vector/vector_slice/vector.expected (+11 -7) =================================================================== --- test/command/suite/select/function/vector/vector_slice/vector.expected 2016-07-18 22:42:33 +0900 (2466b6e) +++ test/command/suite/select/function/vector/vector_slice/vector.expected 2016-07-18 22:55:32 +0900 (08afeb5) @@ -6,12 +6,12 @@ column_create Memos tags COLUMN_VECTOR ShortText [[0,0.0,0.0],true] load --table Memos [ -{"_key": "Groonga", "tags": ["Groonga"]}, -{"_key": "Rroonga", "tags": ["Groonga", "Ruby"]}, +{"_key": "Groonga", "tags": ["Groonga", "Full text search"]}, +{"_key": "Rroonga", "tags": ["Groonga", "Full text search", "Ruby", "Library"]}, {"_key": "Nothing"} ] [[0,0.0,0.0],3] -select Memos --output_columns 'tags, vector_slice(tags, 0, 1)' +select Memos --output_columns 'tags, vector_slice(tags, 1, 2)' [ [ 0, @@ -35,19 +35,23 @@ select Memos --output_columns 'tags, vector_slice(tags, 0, 1)' ], [ [ - "Groonga" + "Groonga", + "Full text search" ], [ - "Groonga" + "Full text search" ] ], [ [ "Groonga", - "Ruby" + "Full text search", + "Ruby", + "Library" ], [ - "Groonga" + "Full text search", + "Ruby" ] ], [ Modified: test/command/suite/select/function/vector/vector_slice/vector.test (+3 -3) =================================================================== --- test/command/suite/select/function/vector/vector_slice/vector.test 2016-07-18 22:42:33 +0900 (a5c4b52) +++ test/command/suite/select/function/vector/vector_slice/vector.test 2016-07-18 22:55:32 +0900 (5f5febb) @@ -5,10 +5,10 @@ column_create Memos tags COLUMN_VECTOR ShortText load --table Memos [ -{"_key": "Groonga", "tags": ["Groonga"]}, -{"_key": "Rroonga", "tags": ["Groonga", "Ruby"]}, +{"_key": "Groonga", "tags": ["Groonga", "Full text search"]}, +{"_key": "Rroonga", "tags": ["Groonga", "Full text search", "Ruby", "Library"]}, {"_key": "Nothing"} ] select Memos \ - --output_columns 'tags, vector_slice(tags, 0, 1)' + --output_columns 'tags, vector_slice(tags, 1, 2)' Modified: test/command/suite/select/function/vector/vector_slice/weight_reference_vector.expected (+11 -7) =================================================================== --- test/command/suite/select/function/vector/vector_slice/weight_reference_vector.expected 2016-07-18 22:42:33 +0900 (e6b4d4e) +++ test/command/suite/select/function/vector/vector_slice/weight_reference_vector.expected 2016-07-18 22:55:32 +0900 (e4e673a) @@ -8,12 +8,12 @@ column_create Memos tags COLUMN_VECTOR|WITH_WEIGHT Tags [[0,0.0,0.0],true] load --table Memos [ -{"_key": "Groonga", "tags": {"Groonga": 100}}, -{"_key": "Rroonga", "tags": {"Groonga": 100, "Ruby": 50}}, +{"_key": "Groonga", "tags": {"Groonga": 100, "Full text search": 90}}, +{"_key": "Rroonga", "tags": {"Groonga": 100, "Full text search": 90, "Ruby": 50, "Library": 30}}, {"_key": "Nothing"} ] [[0,0.0,0.0],3] -select Memos --columns[slice].stage output --columns[slice].type Tags --columns[slice].flags COLUMN_VECTOR|WITH_WEIGHT --columns[slice].value 'vector_slice(tags, 0, 1)' --output_columns 'tags, slice' +select Memos --columns[slice].stage output --columns[slice].type Tags --columns[slice].flags COLUMN_VECTOR|WITH_WEIGHT --columns[slice].value 'vector_slice(tags, 1, 2)' --output_columns 'tags, slice' [ [ 0, @@ -37,19 +37,23 @@ select Memos --columns[slice].stage output --columns[slice].type Tags --co ], [ { - "Groonga": 100 + "Groonga": 100, + "Full text search": 90 }, { - "Groonga": 100 + "Full text search": 90 } ], [ { "Groonga": 100, - "Ruby": 50 + "Full text search": 90, + "Ruby": 50, + "Library": 30 }, { - "Groonga": 100 + "Full text search": 90, + "Ruby": 50 } ], [ Modified: test/command/suite/select/function/vector/vector_slice/weight_reference_vector.test (+3 -3) =================================================================== --- test/command/suite/select/function/vector/vector_slice/weight_reference_vector.test 2016-07-18 22:42:33 +0900 (24e2daf) +++ test/command/suite/select/function/vector/vector_slice/weight_reference_vector.test 2016-07-18 22:55:32 +0900 (394c608) @@ -7,8 +7,8 @@ column_create Memos tags COLUMN_VECTOR|WITH_WEIGHT Tags load --table Memos [ -{"_key": "Groonga", "tags": {"Groonga": 100}}, -{"_key": "Rroonga", "tags": {"Groonga": 100, "Ruby": 50}}, +{"_key": "Groonga", "tags": {"Groonga": 100, "Full text search": 90}}, +{"_key": "Rroonga", "tags": {"Groonga": 100, "Full text search": 90, "Ruby": 50, "Library": 30}}, {"_key": "Nothing"} ] @@ -16,5 +16,5 @@ select Memos \ --columns[slice].stage output \ --columns[slice].type Tags \ --columns[slice].flags COLUMN_VECTOR|WITH_WEIGHT \ - --columns[slice].value 'vector_slice(tags, 0, 1)' \ + --columns[slice].value 'vector_slice(tags, 1, 2)' \ --output_columns 'tags, slice' -------------- next part -------------- HTML����������������������������... Download