Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ii offline: fix a wrong index constructed bug
It's caused only when vector column is a source and WITH_SECTION isn't specified.
- Loading branch information
Showing
5 changed files
with
128 additions
and
1 deletion.
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
46 changes: 46 additions & 0 deletions
46
test/command/suite/load/index/offline/vector_text_without_section.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,46 @@ | ||
| plugin_register functions/index_column | ||
| [[0,0.0,0.0],true] | ||
| table_create Docs TABLE_NO_KEY | ||
| [[0,0.0,0.0],true] | ||
| column_create Docs sentences COLUMN_VECTOR Text | ||
| [[0,0.0,0.0],true] | ||
| load --table Docs | ||
| [ | ||
| {"sentences": ["-", "-", "-"]} | ||
| ] | ||
| [[0,0.0,0.0],1] | ||
| table_create Words TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram | ||
| [[0,0.0,0.0],true] | ||
| column_create Words docs_sentences COLUMN_INDEX|WITH_POSITION Docs sentences | ||
| [[0,0.0,0.0],true] | ||
| select Words --limit -1 --sort_keys _key --output_columns '_key, index_column_source_records("docs_sentences")' | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 1 | ||
| ], | ||
| [ | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ], | ||
| [ | ||
| "index_column_source_records", | ||
| null | ||
| ] | ||
| ], | ||
| [ | ||
| "-", | ||
| [ | ||
| 1 | ||
| ] | ||
| ] | ||
| ] | ||
| ] | ||
| ] |
17 changes: 17 additions & 0 deletions
17
test/command/suite/load/index/offline/vector_text_without_section.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,17 @@ | ||
| plugin_register functions/index_column | ||
|
|
||
| table_create Docs TABLE_NO_KEY | ||
| column_create Docs sentences COLUMN_VECTOR Text | ||
|
|
||
| load --table Docs | ||
| [ | ||
| {"sentences": ["-", "-", "-"]} | ||
| ] | ||
|
|
||
| table_create Words TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram | ||
| column_create Words docs_sentences COLUMN_INDEX|WITH_POSITION Docs sentences | ||
|
|
||
| select Words \ | ||
| --limit -1 \ | ||
| --sort_keys _key \ | ||
| --output_columns '_key, index_column_source_records("docs_sentences")' |
46 changes: 46 additions & 0 deletions
46
test/command/suite/load/index/online/vector/text_without_section.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,46 @@ | ||
| plugin_register functions/index_column | ||
| [[0,0.0,0.0],true] | ||
| table_create Docs TABLE_NO_KEY | ||
| [[0,0.0,0.0],true] | ||
| column_create Docs sentences COLUMN_VECTOR Text | ||
| [[0,0.0,0.0],true] | ||
| table_create Words TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram | ||
| [[0,0.0,0.0],true] | ||
| column_create Words docs_sentences COLUMN_INDEX|WITH_POSITION Docs sentences | ||
| [[0,0.0,0.0],true] | ||
| load --table Docs | ||
| [ | ||
| {"sentences": ["-", "-", "-"]} | ||
| ] | ||
| [[0,0.0,0.0],1] | ||
| select Words --limit -1 --sort_keys _key --output_columns '_key, index_column_source_records("docs_sentences")' | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 1 | ||
| ], | ||
| [ | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ], | ||
| [ | ||
| "index_column_source_records", | ||
| null | ||
| ] | ||
| ], | ||
| [ | ||
| "-", | ||
| [ | ||
| 1 | ||
| ] | ||
| ] | ||
| ] | ||
| ] | ||
| ] |
17 changes: 17 additions & 0 deletions
17
test/command/suite/load/index/online/vector/text_without_section.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,17 @@ | ||
| plugin_register functions/index_column | ||
|
|
||
| table_create Docs TABLE_NO_KEY | ||
| column_create Docs sentences COLUMN_VECTOR Text | ||
|
|
||
| table_create Words TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram | ||
| column_create Words docs_sentences COLUMN_INDEX|WITH_POSITION Docs sentences | ||
|
|
||
| load --table Docs | ||
| [ | ||
| {"sentences": ["-", "-", "-"]} | ||
| ] | ||
|
|
||
| select Words \ | ||
| --limit -1 \ | ||
| --sort_keys _key \ | ||
| --output_columns '_key, index_column_source_records("docs_sentences")' |