Navigation Menu

Skip to content

Commit

Permalink
test: add drilldowns[LABEL].filter test case without cache
Browse files Browse the repository at this point in the history
  • Loading branch information
kenhys committed Apr 14, 2017
1 parent eb8f465 commit 1e5c369
Show file tree
Hide file tree
Showing 2 changed files with 182 additions and 0 deletions.
162 changes: 162 additions & 0 deletions test/command/suite/select/cache/drilldowns/filter.expected
@@ -0,0 +1,162 @@
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 --drilldowns[tag].keys tag --drilldowns[tag].filter '_key != "Groonga"'
[
[
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"
]
],
{
"tag": [
[
2
],
[
[
"_key",
"ShortText"
],
[
"_nsubrecs",
"Int32"
]
],
[
"Mroonga",
1
],
[
"Rroonga",
1
]
]
}
]
]
select Memos --drilldowns[tag].keys tag --drilldowns[tag].filter '_key != "Mroonga"'
[
[
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"
]
],
{
"tag": [
[
2
],
[
[
"_key",
"ShortText"
],
[
"_nsubrecs",
"Int32"
]
],
[
"Groonga",
2
],
[
"Rroonga",
1
]
]
}
]
]
20 changes: 20 additions & 0 deletions test/command/suite/select/cache/drilldowns/filter.test
@@ -0,0 +1,20 @@
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 \
--drilldowns[tag].keys tag \
--drilldowns[tag].filter '_key != "Groonga"'

select Memos \
--drilldowns[tag].keys tag \
--drilldowns[tag].filter '_key != "Mroonga"'

0 comments on commit 1e5c369

Please sign in to comment.