[Groonga-commit] groonga/groonga at f42a293 [master] test: add drilldowns[LABEL].filter test case without cache

Back to archive index

Kentaro Hayashi null+****@clear*****
Mon Apr 17 18:40:33 JST 2017


Kentaro Hayashi	2017-04-17 18:40:33 +0900 (Mon, 17 Apr 2017)

  New Revision: f42a293ed9f77428fcf444d51d21c19ee3c38d21
  https://github.com/groonga/groonga/commit/f42a293ed9f77428fcf444d51d21c19ee3c38d21

  Merged 6812579: Merge pull request #659 from kenhys/test-cache-drilldowns-filter

  Message:
    test: add drilldowns[LABEL].filter test case without cache
    
    When the value of drilldowns[LABEL].filter parameter is changed,
    Groonga returns result without using cache.

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

  Added: test/command/suite/sharding/logical_select/cache/drilldowns/filter.expected (+299 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_select/cache/drilldowns/filter.expected    2017-04-17 18:40:33 +0900 (79a72aa)
@@ -0,0 +1,299 @@
+plugin_register sharding
+[[0,0.0,0.0],true]
+table_create Logs_20150203 TABLE_NO_KEY
+[[0,0.0,0.0],true]
+column_create Logs_20150203 timestamp COLUMN_SCALAR Time
+[[0,0.0,0.0],true]
+column_create Logs_20150203 memo COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+column_create Logs_20150203 action COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+table_create Logs_20150204 TABLE_NO_KEY
+[[0,0.0,0.0],true]
+column_create Logs_20150204 timestamp COLUMN_SCALAR Time
+[[0,0.0,0.0],true]
+column_create Logs_20150204 memo COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+column_create Logs_20150204 action COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+table_create Logs_20150205 TABLE_NO_KEY
+[[0,0.0,0.0],true]
+column_create Logs_20150205 timestamp COLUMN_SCALAR Time
+[[0,0.0,0.0],true]
+column_create Logs_20150205 memo COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+column_create Logs_20150205 action COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+load --table Logs_20150203
+[
+{
+  "timestamp": "2015-02-03 12:49:00",
+  "memo":      "2015-02-03 12:49:00",
+  "action":    "Start"
+},
+{
+  "timestamp": "2015-02-03 23:59:59",
+  "memo":      "2015-02-03 23:59:59",
+  "action":    "Shutdown"
+}
+]
+[[0,0.0,0.0],2]
+load --table Logs_20150204
+[
+{
+  "timestamp": "2015-02-04 00:00:00",
+  "memo":      "2015-02-04 00:00:00",
+  "action":    "Start"
+},
+{
+  "timestamp": "2015-02-04 13:49:00",
+  "memo":      "2015-02-04 13:49:00",
+  "action":    "Restart"
+},
+{
+  "timestamp": "2015-02-04 13:50:00",
+  "memo":      "2015-02-04 13:50:00",
+  "action":    "Restart"
+}
+]
+[[0,0.0,0.0],3]
+load --table Logs_20150205
+[
+{
+  "timestamp": "2015-02-05 13:49:00",
+  "memo":      "2015-02-05 13:49:00",
+  "action":    "Restart"
+},
+{
+  "timestamp": "2015-02-05 13:50:00",
+  "memo":      "2015-02-05 13:50:00",
+  "action":    "Restart"
+},
+{
+  "timestamp": "2015-02-05 13:51:00",
+  "memo":      "2015-02-05 13:51:00",
+  "action":    "Restart"
+},
+{
+  "timestamp": "2015-02-05 13:52:00",
+  "memo":      "2015-02-05 13:52:00",
+  "action":    "Restart"
+}
+]
+[[0,0.0,0.0],4]
+logical_select Logs   --shard_key timestamp   --drilldowns[category].stage initial   --drilldowns[category].keys 'action'   --drilldowns[category].filter "_key @ 'Restart'"   --drilldowns[category].output_columns _key,_nsubrecs
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        9
+      ],
+      [
+        [
+          "_id",
+          "UInt32"
+        ],
+        [
+          "action",
+          "ShortText"
+        ],
+        [
+          "memo",
+          "ShortText"
+        ],
+        [
+          "timestamp",
+          "Time"
+        ]
+      ],
+      [
+        1,
+        "Start",
+        "2015-02-03 12:49:00",
+        1422935340.0
+      ],
+      [
+        2,
+        "Shutdown",
+        "2015-02-03 23:59:59",
+        1422975599.0
+      ],
+      [
+        1,
+        "Start",
+        "2015-02-04 00:00:00",
+        1422975600.0
+      ],
+      [
+        2,
+        "Restart",
+        "2015-02-04 13:49:00",
+        1423025340.0
+      ],
+      [
+        3,
+        "Restart",
+        "2015-02-04 13:50:00",
+        1423025400.0
+      ],
+      [
+        1,
+        "Restart",
+        "2015-02-05 13:49:00",
+        1423111740.0
+      ],
+      [
+        2,
+        "Restart",
+        "2015-02-05 13:50:00",
+        1423111800.0
+      ],
+      [
+        3,
+        "Restart",
+        "2015-02-05 13:51:00",
+        1423111860.0
+      ],
+      [
+        4,
+        "Restart",
+        "2015-02-05 13:52:00",
+        1423111920.0
+      ]
+    ],
+    {
+      "category": [
+        [
+          1
+        ],
+        [
+          [
+            "_key",
+            "ShortText"
+          ],
+          [
+            "_nsubrecs",
+            "Int32"
+          ]
+        ],
+        [
+          "Restart",
+          6
+        ]
+      ]
+    }
+  ]
+]
+logical_select Logs   --shard_key timestamp   --drilldowns[category].stage initial   --drilldowns[category].keys 'action'   --drilldowns[category].filter "_key @ 'Shutdown'"   --drilldowns[category].output_columns _key,_nsubrecs
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        9
+      ],
+      [
+        [
+          "_id",
+          "UInt32"
+        ],
+        [
+          "action",
+          "ShortText"
+        ],
+        [
+          "memo",
+          "ShortText"
+        ],
+        [
+          "timestamp",
+          "Time"
+        ]
+      ],
+      [
+        1,
+        "Start",
+        "2015-02-03 12:49:00",
+        1422935340.0
+      ],
+      [
+        2,
+        "Shutdown",
+        "2015-02-03 23:59:59",
+        1422975599.0
+      ],
+      [
+        1,
+        "Start",
+        "2015-02-04 00:00:00",
+        1422975600.0
+      ],
+      [
+        2,
+        "Restart",
+        "2015-02-04 13:49:00",
+        1423025340.0
+      ],
+      [
+        3,
+        "Restart",
+        "2015-02-04 13:50:00",
+        1423025400.0
+      ],
+      [
+        1,
+        "Restart",
+        "2015-02-05 13:49:00",
+        1423111740.0
+      ],
+      [
+        2,
+        "Restart",
+        "2015-02-05 13:50:00",
+        1423111800.0
+      ],
+      [
+        3,
+        "Restart",
+        "2015-02-05 13:51:00",
+        1423111860.0
+      ],
+      [
+        4,
+        "Restart",
+        "2015-02-05 13:52:00",
+        1423111920.0
+      ]
+    ],
+    {
+      "category": [
+        [
+          1
+        ],
+        [
+          [
+            "_key",
+            "ShortText"
+          ],
+          [
+            "_nsubrecs",
+            "Int32"
+          ]
+        ],
+        [
+          "Shutdown",
+          1
+        ]
+      ]
+    }
+  ]
+]

  Added: test/command/suite/sharding/logical_select/cache/drilldowns/filter.test (+89 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_select/cache/drilldowns/filter.test    2017-04-17 18:40:33 +0900 (51b8c3d)
@@ -0,0 +1,89 @@
+#@on-error omit
+plugin_register sharding
+#@on-error default
+
+table_create Logs_20150203 TABLE_NO_KEY
+column_create Logs_20150203 timestamp COLUMN_SCALAR Time
+column_create Logs_20150203 memo COLUMN_SCALAR ShortText
+column_create Logs_20150203 action COLUMN_SCALAR ShortText
+
+table_create Logs_20150204 TABLE_NO_KEY
+column_create Logs_20150204 timestamp COLUMN_SCALAR Time
+column_create Logs_20150204 memo COLUMN_SCALAR ShortText
+column_create Logs_20150204 action COLUMN_SCALAR ShortText
+
+table_create Logs_20150205 TABLE_NO_KEY
+column_create Logs_20150205 timestamp COLUMN_SCALAR Time
+column_create Logs_20150205 memo COLUMN_SCALAR ShortText
+column_create Logs_20150205 action COLUMN_SCALAR ShortText
+
+load --table Logs_20150203
+[
+{
+  "timestamp": "2015-02-03 12:49:00",
+  "memo":      "2015-02-03 12:49:00",
+  "action":    "Start"
+},
+{
+  "timestamp": "2015-02-03 23:59:59",
+  "memo":      "2015-02-03 23:59:59",
+  "action":    "Shutdown"
+}
+]
+
+load --table Logs_20150204
+[
+{
+  "timestamp": "2015-02-04 00:00:00",
+  "memo":      "2015-02-04 00:00:00",
+  "action":    "Start"
+},
+{
+  "timestamp": "2015-02-04 13:49:00",
+  "memo":      "2015-02-04 13:49:00",
+  "action":    "Restart"
+},
+{
+  "timestamp": "2015-02-04 13:50:00",
+  "memo":      "2015-02-04 13:50:00",
+  "action":    "Restart"
+}
+]
+
+load --table Logs_20150205
+[
+{
+  "timestamp": "2015-02-05 13:49:00",
+  "memo":      "2015-02-05 13:49:00",
+  "action":    "Restart"
+},
+{
+  "timestamp": "2015-02-05 13:50:00",
+  "memo":      "2015-02-05 13:50:00",
+  "action":    "Restart"
+},
+{
+  "timestamp": "2015-02-05 13:51:00",
+  "memo":      "2015-02-05 13:51:00",
+  "action":    "Restart"
+},
+{
+  "timestamp": "2015-02-05 13:52:00",
+  "memo":      "2015-02-05 13:52:00",
+  "action":    "Restart"
+}
+]
+
+logical_select Logs \
+  --shard_key timestamp \
+  --drilldowns[category].stage initial \
+  --drilldowns[category].keys 'action' \
+  --drilldowns[category].filter "_key @ 'Restart'" \
+  --drilldowns[category].output_columns _key,_nsubrecs
+
+logical_select Logs \
+  --shard_key timestamp \
+  --drilldowns[category].stage initial \
+  --drilldowns[category].keys 'action' \
+  --drilldowns[category].filter "_key @ 'Shutdown'" \
+  --drilldowns[category].output_columns _key,_nsubrecs
-------------- next part --------------
HTML����������������������������...
Download 



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