[Groonga-commit] groonga/groonga at 25dcd0e [master] test: add no hit dynamic columns with match_columns without error

Back to archive index

Kentaro Hayashi null+****@clear*****
Wed Apr 19 14:28:10 JST 2017


Kentaro Hayashi	2017-04-19 14:28:10 +0900 (Wed, 19 Apr 2017)

  New Revision: 25dcd0e8393bf0a25451c0b651fb6fdf2fb6f458
  https://github.com/groonga/groonga/commit/25dcd0e8393bf0a25451c0b651fb6fdf2fb6f458

  Merged d1600e7: Merge pull request #665 from kenhys/test-no-hit-dynamic-columns-with-match-columns

  Message:
    test: add no hit dynamic columns with match_columns without error
    
    This test case checks whether match_columns with empty records of
    dynamic columns (caption) in initial stage doesn't cause an
    error.

  Added files:
    test/command/suite/sharding/logical_select/columns/stage/initial/no_hit/match_columns.expected
    test/command/suite/sharding/logical_select/columns/stage/initial/no_hit/match_columns.test

  Added: test/command/suite/sharding/logical_select/columns/stage/initial/no_hit/match_columns.expected (+61 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_select/columns/stage/initial/no_hit/match_columns.expected    2017-04-19 14:28:10 +0900 (ff93d4e)
@@ -0,0 +1,61 @@
+plugin_register sharding
+[[0,0.0,0.0],true]
+plugin_register functions/string
+[[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   --columns[caption].stage initial   --columns[caption].type ShortText   --columns[caption].flags COLUMN_SCALAR   --columns[caption].value "string_substring(content, 0, 8)"   --min "2017/04/01 00:00:00"   --query "Groonga"   --match_columns caption
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        0
+      ],
+      [
+        [
+          "_id",
+          "UInt32"
+        ],
+        [
+          "caption",
+          "ShortText"
+        ],
+        [
+          "content",
+          "Text"
+        ],
+        [
+          "timestamp",
+          "Time"
+        ]
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/sharding/logical_select/columns/stage/initial/no_hit/match_columns.test (+35 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_select/columns/stage/initial/no_hit/match_columns.test    2017-04-19 14:28:10 +0900 (daf2f24)
@@ -0,0 +1,35 @@
+#@on-error omit
+plugin_register sharding
+#@on-error default
+
+plugin_register functions/string
+
+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 \
+  --columns[caption].stage initial \
+  --columns[caption].type ShortText \
+  --columns[caption].flags COLUMN_SCALAR \
+  --columns[caption].value "string_substring(content, 0, 8)" \
+  --min "2017/04/01 00:00:00" \
+  --query "Groonga" \
+  --match_columns caption
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index