Kentaro Hayashi
null+****@clear*****
Wed Apr 19 17:09:24 JST 2017
Kentaro Hayashi 2017-04-19 17:09:24 +0900 (Wed, 19 Apr 2017) New Revision: 21ee72cae09719371e7975a94cf4cfb63575c1df https://github.com/groonga/groonga/commit/21ee72cae09719371e7975a94cf4cfb63575c1df Merged 9d89e2c: Merge pull request #668 from kenhys/test-no-hit-dynamic-columns-with-output-columns-filtered Message: test: add no hit dynamic columns with output_columns without error This test case checks whether output_columns with empty records( content:@slow doesn't match any records) of dynamic columns (highlighted_content) in filtered stage doesn't cause an error. Added files: test/command/suite/sharding/logical_select/columns/stage/filtered/no_hit/output_columns.expected test/command/suite/sharding/logical_select/columns/stage/filtered/no_hit/output_columns.test Added: test/command/suite/sharding/logical_select/columns/stage/filtered/no_hit/output_columns.expected (+28 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_select/columns/stage/filtered/no_hit/output_columns.expected 2017-04-19 17:09:24 +0900 (d532451) @@ -0,0 +1,28 @@ +plugin_register sharding +[[0,0.0,0.0],true] +table_create Memos_20170315 TABLE_NO_KEY +[[0,0.0,0.0],true] +column_create Memos_20170315 timestamp COLUMN_SCALAR Time +[[0,0.0,0.0],true] +column_create Memos_20170315 content COLUMN_SCALAR Text +[[0,0.0,0.0],true] +table_create Memos_20170316 TABLE_NO_KEY +[[0,0.0,0.0],true] +column_create Memos_20170316 timestamp COLUMN_SCALAR Time +[[0,0.0,0.0],true] +column_create Memos_20170316 content COLUMN_SCALAR Text +[[0,0.0,0.0],true] +load --table Memos_20170315 +[ +{"timestamp": "2017/03/15 00:00:00", "content": "Groonga is fast."}, +{"timestamp": "2017/03/15 01:00:00", "content": "Mroonga is fast and easy to use."} +] +[[0,0.0,0.0],2] +load --table Memos_20170316 +[ +{"timestamp": "2017/03/16 10:00:00", "content": "PGroonga is fast and easy to use."}, +{"timestamp": "2017/03/16 11:00:00", "content": "Rroonga is fast and easy to use."} +] +[[0,0.0,0.0],2] +logical_select Memos --shard_key timestamp --query 'content:@slow' --columns[highlighted_content].stage filtered --columns[highlighted_content].type Text --columns[highlighted_content].flags COLUMN_SCALAR --columns[highlighted_content].value 'highlight_html(content)' --output_columns highlighted_content +[[0,0.0,0.0],[[[0],[["highlighted_content","Text"]]]]] Added: test/command/suite/sharding/logical_select/columns/stage/filtered/no_hit/output_columns.test (+32 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/sharding/logical_select/columns/stage/filtered/no_hit/output_columns.test 2017-04-19 17:09:24 +0900 (2359453) @@ -0,0 +1,32 @@ +#@on-error omit +plugin_register sharding +#@on-error default + +table_create Memos_20170315 TABLE_NO_KEY +column_create Memos_20170315 timestamp COLUMN_SCALAR Time +column_create Memos_20170315 content COLUMN_SCALAR Text + +table_create Memos_20170316 TABLE_NO_KEY +column_create Memos_20170316 timestamp COLUMN_SCALAR Time +column_create Memos_20170316 content COLUMN_SCALAR Text + +load --table Memos_20170315 +[ +{"timestamp": "2017/03/15 00:00:00", "content": "Groonga is fast."}, +{"timestamp": "2017/03/15 01:00:00", "content": "Mroonga is fast and easy to use."} +] + +load --table Memos_20170316 +[ +{"timestamp": "2017/03/16 10:00:00", "content": "PGroonga is fast and easy to use."}, +{"timestamp": "2017/03/16 11:00:00", "content": "Rroonga is fast and easy to use."} +] + +logical_select Memos \ + --shard_key timestamp \ + --query 'content:@slow' \ + --columns[highlighted_content].stage filtered \ + --columns[highlighted_content].type Text \ + --columns[highlighted_content].flags COLUMN_SCALAR \ + --columns[highlighted_content].value 'highlight_html(content)' \ + --output_columns highlighted_content -------------- next part -------------- HTML����������������������������...Download