[Groonga-commit] groonga/groonga at b8338d6 [master] logical_select test: add a test for labeled drilldown with sortby _value.XXX

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Jul 7 17:34:37 JST 2015


Kouhei Sutou	2015-07-07 17:34:37 +0900 (Tue, 07 Jul 2015)

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

  Message:
    logical_select test: add a test for labeled drilldown with sortby _value.XXX
    
    `sortby _value.XXX` works only for one shard. It's not supported against
    two or more shards.

  Renamed files:
    test/command/suite/sharding/logical_select/drilldown/labeled/sortby/multiple/one_shard.expected
      (from test/command/suite/sharding/logical_select/drilldown/labeled/sortby/multiple.expected)
    test/command/suite/sharding/logical_select/drilldown/labeled/sortby/multiple/one_shard.test
      (from test/command/suite/sharding/logical_select/drilldown/labeled/sortby/multiple.test)

  Renamed: test/command/suite/sharding/logical_select/drilldown/labeled/sortby/multiple/one_shard.expected (+33 -37) 83%
===================================================================
--- test/command/suite/sharding/logical_select/drilldown/labeled/sortby/multiple.expected    2015-07-07 16:39:02 +0900 (2cdca5a)
+++ test/command/suite/sharding/logical_select/drilldown/labeled/sortby/multiple/one_shard.expected    2015-07-07 17:34:37 +0900 (49aacf6)
@@ -33,26 +33,26 @@ 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",
-  "date":      "2015-02-03",
-  "action":    "Start"
-},
-{
   "timestamp": "2015-02-03 23:59:59",
   "memo":      "2015-02-03 23:59:59",
   "date":      "2015-02-03",
   "action":    "Shutdown"
+},
+{
+  "timestamp": "2015-02-03 12:49:00",
+  "memo":      "2015-02-03 12:49:00",
+  "date":      "2015-02-03",
+  "action":    "Start"
 }
 ]
 [[0,0.0,0.0],2]
 load --table Logs_20150204
 [
 {
-  "timestamp": "2015-02-04 00:00:00",
-  "memo":      "2015-02-04 00:00:00",
+  "timestamp": "2015-02-04 13:50:00",
+  "memo":      "2015-02-04 13:50:00",
   "date":      "2015-02-04",
-  "action":    "Start"
+  "action":    "Restart"
 },
 {
   "timestamp": "2015-02-04 13:49:00",
@@ -61,42 +61,48 @@ load --table Logs_20150204
   "action":    "Restart"
 },
 {
-  "timestamp": "2015-02-04 13:50:00",
-  "memo":      "2015-02-04 13:50:00",
+  "timestamp": "2015-02-04 00:00:00",
+  "memo":      "2015-02-04 00:00:00",
   "date":      "2015-02-04",
-  "action":    "Restart"
+  "action":    "Start"
 }
 ]
 [[0,0.0,0.0],3]
 load --table Logs_20150205
 [
 {
-  "timestamp": "2015-02-05 13:49:00",
-  "memo":      "2015-02-05 13:49:00",
+  "timestamp": "2015-02-05 13:53:00",
+  "memo":      "2015-02-05 13:53:00",
   "date":      "2015-02-05",
-  "action":    "Restart"
+  "action":    "Shutdown"
 },
 {
-  "timestamp": "2015-02-05 13:50:00",
-  "memo":      "2015-02-05 13:50:00",
+  "timestamp": "2015-02-05 13:52:00",
+  "memo":      "2015-02-05 13:52:00",
   "date":      "2015-02-05",
-  "action":    "Restart"
+  "action":    "Start"
 },
 {
   "timestamp": "2015-02-05 13:51:00",
   "memo":      "2015-02-05 13:51:00",
   "date":      "2015-02-05",
+  "action":    "Shutdown"
+},
+{
+  "timestamp": "2015-02-05 13:50:00",
+  "memo":      "2015-02-05 13:50:00",
+  "date":      "2015-02-05",
   "action":    "Restart"
 },
 {
-  "timestamp": "2015-02-05 13:52:00",
-  "memo":      "2015-02-05 13:52:00",
+  "timestamp": "2015-02-05 13:49:00",
+  "memo":      "2015-02-05 13:49:00",
   "date":      "2015-02-05",
   "action":    "Restart"
 }
 ]
-[[0,0.0,0.0],4]
-logical_select Logs timestamp   --limit 0   --drilldown[action_date].keys action,date   --drilldown[action_date].output_columns _value.action,_value.date,_nsubrecs   --drilldown[action_date].sortby -_nsubrecs,_value.date,_value.action
+[[0,0.0,0.0],5]
+logical_select Logs timestamp   --min "2015-02-05 00:00:00"   --min_border "include"   --max "2015-02-06 00:00:00"   --max_border "exclude"   --limit 0   --drilldown[action_date].keys action,date   --drilldown[action_date].output_columns _value.action,_value.date,_nsubrecs   --drilldown[action_date].sortby -_nsubrecs,_value.date,_value.action
 [
   [
     0,
@@ -106,7 +112,7 @@ logical_select Logs timestamp   --limit 0   --drilldown[action_date].keys action
   [
     [
       [
-        9
+        5
       ],
       [
         [
@@ -130,7 +136,7 @@ logical_select Logs timestamp   --limit 0   --drilldown[action_date].keys action
     {
       "action_date": [
         [
-          5
+          3
         ],
         [
           [
@@ -149,26 +155,16 @@ logical_select Logs timestamp   --limit 0   --drilldown[action_date].keys action
         [
           "Restart",
           "2015-02-05",
-          4
-        ],
-        [
-          "Restart",
-          "2015-02-04",
           2
         ],
         [
           "Shutdown",
-          "2015-02-03",
-          1
-        ],
-        [
-          "Start",
-          "2015-02-03",
-          1
+          "2015-02-05",
+          2
         ],
         [
           "Start",
-          "2015-02-04",
+          "2015-02-05",
           1
         ]
       ]

  Renamed: test/command/suite/sharding/logical_select/drilldown/labeled/sortby/multiple/one_shard.test (+30 -20) 88%
===================================================================
--- test/command/suite/sharding/logical_select/drilldown/labeled/sortby/multiple.test    2015-07-07 16:39:02 +0900 (eb7c87e)
+++ test/command/suite/sharding/logical_select/drilldown/labeled/sortby/multiple/one_shard.test    2015-07-07 17:34:37 +0900 (0a9993b)
@@ -23,26 +23,26 @@ 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",
-  "date":      "2015-02-03",
-  "action":    "Start"
-},
-{
   "timestamp": "2015-02-03 23:59:59",
   "memo":      "2015-02-03 23:59:59",
   "date":      "2015-02-03",
   "action":    "Shutdown"
+},
+{
+  "timestamp": "2015-02-03 12:49:00",
+  "memo":      "2015-02-03 12:49:00",
+  "date":      "2015-02-03",
+  "action":    "Start"
 }
 ]
 
 load --table Logs_20150204
 [
 {
-  "timestamp": "2015-02-04 00:00:00",
-  "memo":      "2015-02-04 00:00:00",
+  "timestamp": "2015-02-04 13:50:00",
+  "memo":      "2015-02-04 13:50:00",
   "date":      "2015-02-04",
-  "action":    "Start"
+  "action":    "Restart"
 },
 {
   "timestamp": "2015-02-04 13:49:00",
@@ -51,42 +51,52 @@ load --table Logs_20150204
   "action":    "Restart"
 },
 {
-  "timestamp": "2015-02-04 13:50:00",
-  "memo":      "2015-02-04 13:50:00",
+  "timestamp": "2015-02-04 00:00:00",
+  "memo":      "2015-02-04 00:00:00",
   "date":      "2015-02-04",
-  "action":    "Restart"
+  "action":    "Start"
 }
 ]
 
 load --table Logs_20150205
 [
 {
-  "timestamp": "2015-02-05 13:49:00",
-  "memo":      "2015-02-05 13:49:00",
+  "timestamp": "2015-02-05 13:53:00",
+  "memo":      "2015-02-05 13:53:00",
   "date":      "2015-02-05",
-  "action":    "Restart"
+  "action":    "Shutdown"
 },
 {
-  "timestamp": "2015-02-05 13:50:00",
-  "memo":      "2015-02-05 13:50:00",
+  "timestamp": "2015-02-05 13:52:00",
+  "memo":      "2015-02-05 13:52:00",
   "date":      "2015-02-05",
-  "action":    "Restart"
+  "action":    "Start"
 },
 {
   "timestamp": "2015-02-05 13:51:00",
   "memo":      "2015-02-05 13:51:00",
   "date":      "2015-02-05",
+  "action":    "Shutdown"
+},
+{
+  "timestamp": "2015-02-05 13:50:00",
+  "memo":      "2015-02-05 13:50:00",
+  "date":      "2015-02-05",
   "action":    "Restart"
 },
 {
-  "timestamp": "2015-02-05 13:52:00",
-  "memo":      "2015-02-05 13:52:00",
+  "timestamp": "2015-02-05 13:49:00",
+  "memo":      "2015-02-05 13:49:00",
   "date":      "2015-02-05",
   "action":    "Restart"
 }
 ]
 
 logical_select Logs timestamp \
+  --min "2015-02-05 00:00:00" \
+  --min_border "include" \
+  --max "2015-02-06 00:00:00" \
+  --max_border "exclude" \
   --limit 0 \
   --drilldown[action_date].keys action,date \
   --drilldown[action_date].output_columns _value.action,_value.date,_nsubrecs \
-------------- next part --------------
HTML����������������������������...
Download 



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