Skip to content

Commit

Permalink
Add a test for offline index construction of _key
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Nov 14, 2012
1 parent f826248 commit 3503cdc
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
58 changes: 58 additions & 0 deletions test/command/suite/load/index/offline/key.expected
@@ -0,0 +1,58 @@
table_create Users TABLE_HASH_KEY ShortText
[[0,0.0,0.0],true]
load --table Users
[
["_key"],
["Alice"],
["Bob"]
]
[[0,0.0,0.0],2]
table_create Names TABLE_PAT_KEY --key_type ShortText --default_tokenizer TokenBigramSplitSymbolAlpha
[[0,0.0,0.0],true]
column_create Names users_name COLUMN_INDEX|WITH_POSITION Users _key
[[0,0.0,0.0],true]
select Names --output_columns _key
[
[
0,
0.0,
0.0
],
[
[
[
8
],
[
[
"_key",
"ShortText"
]
],
[
"Al"
],
[
"Bo"
],
[
"b"
],
[
"ce"
],
[
"e"
],
[
"ic"
],
[
"li"
],
[
"ob"
]
]
]
]
14 changes: 14 additions & 0 deletions test/command/suite/load/index/offline/key.test
@@ -0,0 +1,14 @@
table_create Users TABLE_HASH_KEY ShortText

load --table Users
[
["_key"],
["Alice"],
["Bob"]
]

table_create Names TABLE_PAT_KEY --key_type ShortText \
--default_tokenizer TokenBigramSplitSymbolAlpha
column_create Names users_name COLUMN_INDEX|WITH_POSITION Users _key

select Names --output_columns _key

0 comments on commit 3503cdc

Please sign in to comment.