Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It may be occurred with nested index search. So this change disables "AND min ID skip" optimization when nested index search is used.
- Loading branch information
Showing
3 changed files
with
113 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
test/command/suite/select/filter/index/optimization/and_min_skip/equal_match_match.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| table_create Tags TABLE_HASH_KEY ShortText | ||
| [[0,0.0,0.0],true] | ||
| column_create Tags label COLUMN_SCALAR 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 content COLUMN_SCALAR Text | ||
| [[0,0.0,0.0],true] | ||
| table_create Terms TABLE_PAT_KEY ShortText --normalize NormalizerNFKC100 --default_tokenizer TokenBigram | ||
| [[0,0.0,0.0],true] | ||
| column_create Terms tags_label COLUMN_INDEX|WITH_POSITION Tags label | ||
| [[0,0.0,0.0],true] | ||
| column_create Terms memos_content COLUMN_INDEX|WITH_POSITION Memos content | ||
| [[0,0.0,0.0],true] | ||
| column_create Tags memos_tag COLUMN_INDEX Memos tag | ||
| [[0,0.0,0.0],true] | ||
| load --table Tags | ||
| [ | ||
| {"_key": "mroonga", "label": "Mroonga"}, | ||
| {"_key": "pgroonga", "label": "PGroonga"}, | ||
| {"_key": "groonga", "label": "Groonga"} | ||
| ] | ||
| [[0,0.0,0.0],3] | ||
| load --table Memos | ||
| [ | ||
| {"_key": "groonga", "tag": "groonga", "content": "Groonga is fast"}, | ||
| {"_key": "mroonga", "tag": "mroonga", "content": "Mroonga is based on Groonga"}, | ||
| {"_key": "pgroonga", "tag": "pgroonga", "content": "PGroonga is based on Groonga"} | ||
| ] | ||
| [[0,0.0,0.0],3] | ||
| select Memos --filter '_key == "groonga" && tag.label @ "Groonga" && content @ "Groonga"' | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 1 | ||
| ], | ||
| [ | ||
| [ | ||
| "_id", | ||
| "UInt32" | ||
| ], | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ], | ||
| [ | ||
| "content", | ||
| "Text" | ||
| ], | ||
| [ | ||
| "tag", | ||
| "Tags" | ||
| ] | ||
| ], | ||
| [ | ||
| 1, | ||
| "groonga", | ||
| "Groonga is fast", | ||
| "groonga" | ||
| ] | ||
| ] | ||
| ] | ||
| ] |
31 changes: 31 additions & 0 deletions
31
test/command/suite/select/filter/index/optimization/and_min_skip/equal_match_match.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| table_create Tags TABLE_HASH_KEY ShortText | ||
| column_create Tags label COLUMN_SCALAR ShortText | ||
|
|
||
| table_create Memos TABLE_HASH_KEY ShortText | ||
| column_create Memos tag COLUMN_SCALAR Tags | ||
| column_create Memos content COLUMN_SCALAR Text | ||
|
|
||
| table_create Terms TABLE_PAT_KEY ShortText \ | ||
| --normalize NormalizerNFKC100 \ | ||
| --default_tokenizer TokenBigram | ||
| column_create Terms tags_label COLUMN_INDEX|WITH_POSITION Tags label | ||
| column_create Terms memos_content COLUMN_INDEX|WITH_POSITION Memos content | ||
|
|
||
| column_create Tags memos_tag COLUMN_INDEX Memos tag | ||
|
|
||
| load --table Tags | ||
| [ | ||
| {"_key": "mroonga", "label": "Mroonga"}, | ||
| {"_key": "pgroonga", "label": "PGroonga"}, | ||
| {"_key": "groonga", "label": "Groonga"} | ||
| ] | ||
|
|
||
| load --table Memos | ||
| [ | ||
| {"_key": "groonga", "tag": "groonga", "content": "Groonga is fast"}, | ||
| {"_key": "mroonga", "tag": "mroonga", "content": "Mroonga is based on Groonga"}, | ||
| {"_key": "pgroonga", "tag": "pgroonga", "content": "PGroonga is based on Groonga"} | ||
| ] | ||
|
|
||
| select Memos \ | ||
| --filter '_key == "groonga" && tag.label @ "Groonga" && content @ "Groonga"' |