Navigation Menu

Skip to content

Commit

Permalink
test: add test case when match_columns parameter is changed
Browse files Browse the repository at this point in the history
When the value of --match_columms parameter is changed, Groonga
returns result without using cache.
  • Loading branch information
kenhys committed Apr 14, 2017
1 parent eb8f465 commit efd52d0
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
73 changes: 73 additions & 0 deletions test/command/suite/select/cache/match_columns.expected
@@ -0,0 +1,73 @@
table_create Memos TABLE_HASH_KEY ShortText
[[0,0.0,0.0],true]
column_create Memos tag COLUMN_SCALAR ShortText
[[0,0.0,0.0],true]
load --table Memos
[
{"_key": "Hello Groonga", "tag": "Groonga"},
{"_key": "Hello Rroonga!", "tag": "Rroonga"}
]
[[0,0.0,0.0],2]
select --table Memos --query 'Groonga' --match_columns 'tag'
[
[
0,
0.0,
0.0
],
[
[
[
1
],
[
[
"_id",
"UInt32"
],
[
"_key",
"ShortText"
],
[
"tag",
"ShortText"
]
],
[
1,
"Hello Groonga",
"Groonga"
]
]
]
]
select --table Memos --query 'Groonga' --match_columns '_key'
[
[
0,
0.0,
0.0
],
[
[
[
0
],
[
[
"_id",
"UInt32"
],
[
"_key",
"ShortText"
],
[
"tag",
"ShortText"
]
]
]
]
]
17 changes: 17 additions & 0 deletions test/command/suite/select/cache/match_columns.test
@@ -0,0 +1,17 @@
table_create Memos TABLE_HASH_KEY ShortText
column_create Memos tag COLUMN_SCALAR ShortText

load --table Memos
[
{"_key": "Hello Groonga", "tag": "Groonga"},
{"_key": "Hello Rroonga!", "tag": "Rroonga"}
]

select --table Memos \
--query 'Groonga' \
--match_columns 'tag'

select --table Memos \
--query 'Groonga' \
--match_columns '_key'

0 comments on commit efd52d0

Please sign in to comment.