Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a bug that wrong tag name is used in XML output
It is caused when "REFERENCE_VECTOR_COLUMN._key" is used in output_columns. See a test case for XML output for details.
- Loading branch information
Showing
5 changed files
with
93 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
43 changes: 43 additions & 0 deletions
43
test/command/suite/select/output_columns/vector/reference/key/json.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,43 @@ | ||
| table_create Users TABLE_HASH_KEY ShortText | ||
| [[0,0.0,0.0],true] | ||
| table_create Bookmarks TABLE_HASH_KEY ShortText | ||
| [[0,0.0,0.0],true] | ||
| column_create Bookmarks users COLUMN_VECTOR Users | ||
| [[0,0.0,0.0],true] | ||
| load --table Bookmarks | ||
| [ | ||
| {"_key": "http://groonga.org/", "users": ["mori", "s-yata"]} | ||
| ] | ||
| [[0,0.0,0.0],1] | ||
| select Bookmarks --output_columns _key,users._key | ||
| [ | ||
| [ | ||
| 0, | ||
| 0.0, | ||
| 0.0 | ||
| ], | ||
| [ | ||
| [ | ||
| [ | ||
| 1 | ||
| ], | ||
| [ | ||
| [ | ||
| "_key", | ||
| "ShortText" | ||
| ], | ||
| [ | ||
| "users._key", | ||
| "ShortText" | ||
| ] | ||
| ], | ||
| [ | ||
| "http://groonga.org/", | ||
| [ | ||
| "mori", | ||
| "s-yata" | ||
| ] | ||
| ] | ||
| ] | ||
| ] | ||
| ] |
11 changes: 11 additions & 0 deletions
11
test/command/suite/select/output_columns/vector/reference/key/json.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,11 @@ | ||
| table_create Users TABLE_HASH_KEY ShortText | ||
|
|
||
| table_create Bookmarks TABLE_HASH_KEY ShortText | ||
| column_create Bookmarks users COLUMN_VECTOR Users | ||
|
|
||
| load --table Bookmarks | ||
| [ | ||
| {"_key": "http://groonga.org/", "users": ["mori", "s-yata"]} | ||
| ] | ||
|
|
||
| select Bookmarks --output_columns _key,users._key |
27 changes: 27 additions & 0 deletions
27
test/command/suite/select/output_columns/vector/reference/key/xml.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,27 @@ | ||
| table_create Users TABLE_HASH_KEY ShortText | ||
| [[0,0.0,0.0],true] | ||
| table_create Bookmarks TABLE_HASH_KEY ShortText | ||
| [[0,0.0,0.0],true] | ||
| column_create Bookmarks users COLUMN_VECTOR Users | ||
| [[0,0.0,0.0],true] | ||
| load --table Bookmarks | ||
| [ | ||
| {"_key": "http://groonga.org/", "users": ["mori", "s-yata"]} | ||
| ] | ||
| [[0,0.0,0.0],1] | ||
| select Bookmarks --output_columns _key,users._key --output_type xml | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <SEGMENTS> | ||
| <SEGMENT> | ||
| <RESULTPAGE> | ||
| <RESULTSET OFFSET="0" LIMIT="1" NHITS="1"> | ||
| <HIT NO="1"> | ||
| <FIELD NAME="_key">http://groonga.org/</FIELD> | ||
| <FIELD NAME="users._key">mori, s-yata</FIELD> | ||
| </HIT> | ||
| </RESULTSET> | ||
| </RESULTPAGE> | ||
| </SEGMENT> | ||
| </SEGMENTS> | ||
|
|
||
|
|
11 changes: 11 additions & 0 deletions
11
test/command/suite/select/output_columns/vector/reference/key/xml.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,11 @@ | ||
| table_create Users TABLE_HASH_KEY ShortText | ||
|
|
||
| table_create Bookmarks TABLE_HASH_KEY ShortText | ||
| column_create Bookmarks users COLUMN_VECTOR Users | ||
|
|
||
| load --table Bookmarks | ||
| [ | ||
| {"_key": "http://groonga.org/", "users": ["mori", "s-yata"]} | ||
| ] | ||
|
|
||
| select Bookmarks --output_columns _key,users._key --output_type xml |