[Groonga-commit] groonga/groonga at 5bde6a3 [master] test: add test case when --query parameter is changed

アーカイブの一覧に戻る

Kentaro Hayashi null+****@clear*****
Mon Apr 17 12:13:44 JST 2017


Kentaro Hayashi	2017-04-17 12:13:44 +0900 (Mon, 17 Apr 2017)

  New Revision: 5bde6a343843228042064de4bf4e5538205a901c
  https://github.com/groonga/groonga/commit/5bde6a343843228042064de4bf4e5538205a901c

  Merged b5ff05e: Merge pull request #653 from kenhys/test-cache-query

  Message:
    test: add test case when --query parameter is changed
    
    When the value of --query parameter is changed, Groonga returns result
    without using cache.

  Added files:
    test/command/suite/sharding/logical_select/cache/query.expected
    test/command/suite/sharding/logical_select/cache/query.test

  Added: test/command/suite/sharding/logical_select/cache/query.expected (+109 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_select/cache/query.expected    2017-04-17 12:13:44 +0900 (f990e7f)
@@ -0,0 +1,109 @@
+plugin_register sharding
+[[0,0.0,0.0],true]
+table_create Memos_20170416 TABLE_NO_KEY
+[[0,0.0,0.0],true]
+column_create Memos_20170416 timestamp COLUMN_SCALAR Time
+[[0,0.0,0.0],true]
+column_create Memos_20170416 content COLUMN_SCALAR Text
+[[0,0.0,0.0],true]
+table_create Memos_20170417 TABLE_NO_KEY
+[[0,0.0,0.0],true]
+column_create Memos_20170417 timestamp COLUMN_SCALAR Time
+[[0,0.0,0.0],true]
+column_create Memos_20170417 content COLUMN_SCALAR Text
+[[0,0.0,0.0],true]
+load --table Memos_20170416
+[
+{"timestamp": "2017/04/16 00:00:00", "content": "Groonga is fast."},
+{"timestamp": "2017/04/16 01:00:00", "content": "Mroonga is fast and easy to use."}
+]
+[[0,0.0,0.0],2]
+load --table Memos_20170417
+[
+{"timestamp": "2017/04/17 10:00:00", "content": "PGroonga is fast and easy to use."},
+{"timestamp": "2017/04/17 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:@easy'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        3
+      ],
+      [
+        [
+          "_id",
+          "UInt32"
+        ],
+        [
+          "content",
+          "Text"
+        ],
+        [
+          "timestamp",
+          "Time"
+        ]
+      ],
+      [
+        2,
+        "Mroonga is fast and easy to use.",
+        1492272000.0
+      ],
+      [
+        1,
+        "PGroonga is fast and easy to use.",
+        1492390800.0
+      ],
+      [
+        2,
+        "Rroonga is fast and easy to use.",
+        1492394400.0
+      ]
+    ]
+  ]
+]
+logical_select Memos   --shard_key timestamp   --query 'content:@groonga'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        2
+      ],
+      [
+        [
+          "_id",
+          "UInt32"
+        ],
+        [
+          "content",
+          "Text"
+        ],
+        [
+          "timestamp",
+          "Time"
+        ]
+      ],
+      [
+        1,
+        "Groonga is fast.",
+        1492268400.0
+      ],
+      [
+        1,
+        "PGroonga is fast and easy to use.",
+        1492390800.0
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/sharding/logical_select/cache/query.test (+31 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_select/cache/query.test    2017-04-17 12:13:44 +0900 (174c474)
@@ -0,0 +1,31 @@
+#@on-error omit
+plugin_register sharding
+#@on-error default
+
+table_create Memos_20170416 TABLE_NO_KEY
+column_create Memos_20170416 timestamp COLUMN_SCALAR Time
+column_create Memos_20170416 content COLUMN_SCALAR Text
+
+table_create Memos_20170417 TABLE_NO_KEY
+column_create Memos_20170417 timestamp COLUMN_SCALAR Time
+column_create Memos_20170417 content COLUMN_SCALAR Text
+
+load --table Memos_20170416
+[
+{"timestamp": "2017/04/16 00:00:00", "content": "Groonga is fast."},
+{"timestamp": "2017/04/16 01:00:00", "content": "Mroonga is fast and easy to use."}
+]
+
+load --table Memos_20170417
+[
+{"timestamp": "2017/04/17 10:00:00", "content": "PGroonga is fast and easy to use."},
+{"timestamp": "2017/04/17 11:00:00", "content": "Rroonga is fast and easy to use."}
+]
+
+logical_select Memos \
+  --shard_key timestamp \
+  --query 'content:@easy'
+
+logical_select Memos \
+  --shard_key timestamp \
+  --query 'content:@groonga'
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る