[Groonga-commit] groonga/groonga at 440712a [master] logical_count: add tests for filer and range

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Feb 5 11:09:38 JST 2015


Kouhei Sutou	2015-02-05 11:09:38 +0900 (Thu, 05 Feb 2015)

  New Revision: 440712adf966c6bcb62d91edbb4035e3f52e2fc9
  https://github.com/groonga/groonga/commit/440712adf966c6bcb62d91edbb4035e3f52e2fc9

  Message:
    logical_count: add tests for filer and range
    
    All works well!

  Added files:
    test/command/suite/sharding/logical_count/condition/filter/max_exclude.expected
    test/command/suite/sharding/logical_count/condition/filter/max_exclude.test
    test/command/suite/sharding/logical_count/condition/filter/max_include.expected
    test/command/suite/sharding/logical_count/condition/filter/max_include.test
    test/command/suite/sharding/logical_count/condition/filter/min_exclude.expected
    test/command/suite/sharding/logical_count/condition/filter/min_exclude.test
    test/command/suite/sharding/logical_count/condition/filter/min_exclude_max_exclude.expected
    test/command/suite/sharding/logical_count/condition/filter/min_exclude_max_exclude.test
    test/command/suite/sharding/logical_count/condition/filter/min_exclude_max_include.expected
    test/command/suite/sharding/logical_count/condition/filter/min_exclude_max_include.test
    test/command/suite/sharding/logical_count/condition/filter/min_include.expected
    test/command/suite/sharding/logical_count/condition/filter/min_include.test
    test/command/suite/sharding/logical_count/condition/filter/min_include_max_exclude.expected
    test/command/suite/sharding/logical_count/condition/filter/min_include_max_exclude.test
    test/command/suite/sharding/logical_count/condition/filter/min_include_max_include.expected
    test/command/suite/sharding/logical_count/condition/filter/min_include_max_include.test

  Added: test/command/suite/sharding/logical_count/condition/filter/max_exclude.expected (+48 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_count/condition/filter/max_exclude.expected    2015-02-05 11:09:38 +0900 (447abe4)
@@ -0,0 +1,48 @@
+register sharding/search
+[[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 message COLUMN_SCALAR Text
+[[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 message COLUMN_SCALAR Text
+[[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 message COLUMN_SCALAR Text
+[[0,0.0,0.0],true]
+load --table Logs_20150203
+[
+{"timestamp": "2015-02-03 23:59:58", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:58", "message": "Shutdown"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Shutdown"}
+]
+[[0,0.0,0.0],4]
+load --table Logs_20150204
+[
+{"timestamp": "2015-02-04 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Shutdown"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Shutdown"}
+]
+[[0,0.0,0.0],6]
+load --table Logs_20150205
+[
+{"timestamp": "2015-02-05 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Shutdown"}
+]
+[[0,0.0,0.0],4]
+logical_count Logs timestamp   --filter 'message == "Shutdown"'   --max "2015-02-05 00:00:00"   --max_border "exclude"
+[[0,0.0,0.0],5]

  Added: test/command/suite/sharding/logical_count/condition/filter/max_exclude.test (+47 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_count/condition/filter/max_exclude.test    2015-02-05 11:09:38 +0900 (eebd369)
@@ -0,0 +1,47 @@
+#@on-error omit
+register sharding/search
+#@on-error default
+
+table_create Logs_20150203 TABLE_NO_KEY
+column_create Logs_20150203 timestamp COLUMN_SCALAR Time
+column_create Logs_20150203 message COLUMN_SCALAR Text
+
+table_create Logs_20150204 TABLE_NO_KEY
+column_create Logs_20150204 timestamp COLUMN_SCALAR Time
+column_create Logs_20150204 message COLUMN_SCALAR Text
+
+table_create Logs_20150205 TABLE_NO_KEY
+column_create Logs_20150205 timestamp COLUMN_SCALAR Time
+column_create Logs_20150205 message COLUMN_SCALAR Text
+
+load --table Logs_20150203
+[
+{"timestamp": "2015-02-03 23:59:58", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:58", "message": "Shutdown"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Shutdown"}
+]
+
+load --table Logs_20150204
+[
+{"timestamp": "2015-02-04 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Shutdown"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Shutdown"}
+]
+
+load --table Logs_20150205
+[
+{"timestamp": "2015-02-05 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Shutdown"}
+]
+
+logical_count Logs timestamp \
+  --filter 'message == "Shutdown"' \
+  --max "2015-02-05 00:00:00" \
+  --max_border "exclude"
+

  Added: test/command/suite/sharding/logical_count/condition/filter/max_include.expected (+48 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_count/condition/filter/max_include.expected    2015-02-05 11:09:38 +0900 (98af3f5)
@@ -0,0 +1,48 @@
+register sharding/search
+[[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 message COLUMN_SCALAR Text
+[[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 message COLUMN_SCALAR Text
+[[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 message COLUMN_SCALAR Text
+[[0,0.0,0.0],true]
+load --table Logs_20150203
+[
+{"timestamp": "2015-02-03 23:59:58", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:58", "message": "Shutdown"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Shutdown"}
+]
+[[0,0.0,0.0],4]
+load --table Logs_20150204
+[
+{"timestamp": "2015-02-04 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Shutdown"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Shutdown"}
+]
+[[0,0.0,0.0],6]
+load --table Logs_20150205
+[
+{"timestamp": "2015-02-05 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Shutdown"}
+]
+[[0,0.0,0.0],4]
+logical_count Logs timestamp   --filter 'message == "Shutdown"'   --max "2015-02-05 00:00:00"   --max_border "include"
+[[0,0.0,0.0],6]

  Added: test/command/suite/sharding/logical_count/condition/filter/max_include.test (+47 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_count/condition/filter/max_include.test    2015-02-05 11:09:38 +0900 (78e5abc)
@@ -0,0 +1,47 @@
+#@on-error omit
+register sharding/search
+#@on-error default
+
+table_create Logs_20150203 TABLE_NO_KEY
+column_create Logs_20150203 timestamp COLUMN_SCALAR Time
+column_create Logs_20150203 message COLUMN_SCALAR Text
+
+table_create Logs_20150204 TABLE_NO_KEY
+column_create Logs_20150204 timestamp COLUMN_SCALAR Time
+column_create Logs_20150204 message COLUMN_SCALAR Text
+
+table_create Logs_20150205 TABLE_NO_KEY
+column_create Logs_20150205 timestamp COLUMN_SCALAR Time
+column_create Logs_20150205 message COLUMN_SCALAR Text
+
+load --table Logs_20150203
+[
+{"timestamp": "2015-02-03 23:59:58", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:58", "message": "Shutdown"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Shutdown"}
+]
+
+load --table Logs_20150204
+[
+{"timestamp": "2015-02-04 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Shutdown"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Shutdown"}
+]
+
+load --table Logs_20150205
+[
+{"timestamp": "2015-02-05 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Shutdown"}
+]
+
+logical_count Logs timestamp \
+  --filter 'message == "Shutdown"' \
+  --max "2015-02-05 00:00:00" \
+  --max_border "include"
+

  Added: test/command/suite/sharding/logical_count/condition/filter/min_exclude.expected (+48 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_count/condition/filter/min_exclude.expected    2015-02-05 11:09:38 +0900 (cfc504f)
@@ -0,0 +1,48 @@
+register sharding/search
+[[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 message COLUMN_SCALAR Text
+[[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 message COLUMN_SCALAR Text
+[[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 message COLUMN_SCALAR Text
+[[0,0.0,0.0],true]
+load --table Logs_20150203
+[
+{"timestamp": "2015-02-03 23:59:58", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:58", "message": "Shutdown"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Shutdown"}
+]
+[[0,0.0,0.0],4]
+load --table Logs_20150204
+[
+{"timestamp": "2015-02-04 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Shutdown"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Shutdown"}
+]
+[[0,0.0,0.0],6]
+load --table Logs_20150205
+[
+{"timestamp": "2015-02-05 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Shutdown"}
+]
+[[0,0.0,0.0],4]
+logical_count Logs timestamp   --filter 'message == "Shutdown"'   --min "2015-02-04 00:00:00"   --min_border "exclude"
+[[0,0.0,0.0],4]

  Added: test/command/suite/sharding/logical_count/condition/filter/min_exclude.test (+47 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_count/condition/filter/min_exclude.test    2015-02-05 11:09:38 +0900 (d948813)
@@ -0,0 +1,47 @@
+#@on-error omit
+register sharding/search
+#@on-error default
+
+table_create Logs_20150203 TABLE_NO_KEY
+column_create Logs_20150203 timestamp COLUMN_SCALAR Time
+column_create Logs_20150203 message COLUMN_SCALAR Text
+
+table_create Logs_20150204 TABLE_NO_KEY
+column_create Logs_20150204 timestamp COLUMN_SCALAR Time
+column_create Logs_20150204 message COLUMN_SCALAR Text
+
+table_create Logs_20150205 TABLE_NO_KEY
+column_create Logs_20150205 timestamp COLUMN_SCALAR Time
+column_create Logs_20150205 message COLUMN_SCALAR Text
+
+load --table Logs_20150203
+[
+{"timestamp": "2015-02-03 23:59:58", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:58", "message": "Shutdown"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Shutdown"}
+]
+
+load --table Logs_20150204
+[
+{"timestamp": "2015-02-04 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Shutdown"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Shutdown"}
+]
+
+load --table Logs_20150205
+[
+{"timestamp": "2015-02-05 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Shutdown"}
+]
+
+logical_count Logs timestamp \
+  --filter 'message == "Shutdown"' \
+  --min "2015-02-04 00:00:00" \
+  --min_border "exclude"
+

  Added: test/command/suite/sharding/logical_count/condition/filter/min_exclude_max_exclude.expected (+48 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_count/condition/filter/min_exclude_max_exclude.expected    2015-02-05 11:09:38 +0900 (d65859d)
@@ -0,0 +1,48 @@
+register sharding/search
+[[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 message COLUMN_SCALAR Text
+[[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 message COLUMN_SCALAR Text
+[[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 message COLUMN_SCALAR Text
+[[0,0.0,0.0],true]
+load --table Logs_20150203
+[
+{"timestamp": "2015-02-03 23:59:58", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:58", "message": "Shutdown"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Shutdown"}
+]
+[[0,0.0,0.0],4]
+load --table Logs_20150204
+[
+{"timestamp": "2015-02-04 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Shutdown"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Shutdown"}
+]
+[[0,0.0,0.0],6]
+load --table Logs_20150205
+[
+{"timestamp": "2015-02-05 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Shutdown"}
+]
+[[0,0.0,0.0],4]
+logical_count Logs timestamp   --filter 'message == "Shutdown"'   --min "2015-02-04 00:00:00"   --min_border "exclude"   --max "2015-02-05 00:00:00"   --max_border "exclude"
+[[0,0.0,0.0],2]

  Added: test/command/suite/sharding/logical_count/condition/filter/min_exclude_max_exclude.test (+49 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_count/condition/filter/min_exclude_max_exclude.test    2015-02-05 11:09:38 +0900 (ec55777)
@@ -0,0 +1,49 @@
+#@on-error omit
+register sharding/search
+#@on-error default
+
+table_create Logs_20150203 TABLE_NO_KEY
+column_create Logs_20150203 timestamp COLUMN_SCALAR Time
+column_create Logs_20150203 message COLUMN_SCALAR Text
+
+table_create Logs_20150204 TABLE_NO_KEY
+column_create Logs_20150204 timestamp COLUMN_SCALAR Time
+column_create Logs_20150204 message COLUMN_SCALAR Text
+
+table_create Logs_20150205 TABLE_NO_KEY
+column_create Logs_20150205 timestamp COLUMN_SCALAR Time
+column_create Logs_20150205 message COLUMN_SCALAR Text
+
+load --table Logs_20150203
+[
+{"timestamp": "2015-02-03 23:59:58", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:58", "message": "Shutdown"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Shutdown"}
+]
+
+load --table Logs_20150204
+[
+{"timestamp": "2015-02-04 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Shutdown"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Shutdown"}
+]
+
+load --table Logs_20150205
+[
+{"timestamp": "2015-02-05 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Shutdown"}
+]
+
+logical_count Logs timestamp \
+  --filter 'message == "Shutdown"' \
+  --min "2015-02-04 00:00:00" \
+  --min_border "exclude" \
+  --max "2015-02-05 00:00:00" \
+  --max_border "exclude"
+

  Added: test/command/suite/sharding/logical_count/condition/filter/min_exclude_max_include.expected (+48 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_count/condition/filter/min_exclude_max_include.expected    2015-02-05 11:09:38 +0900 (708ca04)
@@ -0,0 +1,48 @@
+register sharding/search
+[[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 message COLUMN_SCALAR Text
+[[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 message COLUMN_SCALAR Text
+[[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 message COLUMN_SCALAR Text
+[[0,0.0,0.0],true]
+load --table Logs_20150203
+[
+{"timestamp": "2015-02-03 23:59:58", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:58", "message": "Shutdown"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Shutdown"}
+]
+[[0,0.0,0.0],4]
+load --table Logs_20150204
+[
+{"timestamp": "2015-02-04 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Shutdown"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Shutdown"}
+]
+[[0,0.0,0.0],6]
+load --table Logs_20150205
+[
+{"timestamp": "2015-02-05 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Shutdown"}
+]
+[[0,0.0,0.0],4]
+logical_count Logs timestamp   --filter 'message == "Shutdown"'   --min "2015-02-04 00:00:00"   --min_border "exclude"   --max "2015-02-05 00:00:00"   --max_border "include"
+[[0,0.0,0.0],3]

  Added: test/command/suite/sharding/logical_count/condition/filter/min_exclude_max_include.test (+49 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_count/condition/filter/min_exclude_max_include.test    2015-02-05 11:09:38 +0900 (d248b2c)
@@ -0,0 +1,49 @@
+#@on-error omit
+register sharding/search
+#@on-error default
+
+table_create Logs_20150203 TABLE_NO_KEY
+column_create Logs_20150203 timestamp COLUMN_SCALAR Time
+column_create Logs_20150203 message COLUMN_SCALAR Text
+
+table_create Logs_20150204 TABLE_NO_KEY
+column_create Logs_20150204 timestamp COLUMN_SCALAR Time
+column_create Logs_20150204 message COLUMN_SCALAR Text
+
+table_create Logs_20150205 TABLE_NO_KEY
+column_create Logs_20150205 timestamp COLUMN_SCALAR Time
+column_create Logs_20150205 message COLUMN_SCALAR Text
+
+load --table Logs_20150203
+[
+{"timestamp": "2015-02-03 23:59:58", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:58", "message": "Shutdown"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Shutdown"}
+]
+
+load --table Logs_20150204
+[
+{"timestamp": "2015-02-04 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Shutdown"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Shutdown"}
+]
+
+load --table Logs_20150205
+[
+{"timestamp": "2015-02-05 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Shutdown"}
+]
+
+logical_count Logs timestamp \
+  --filter 'message == "Shutdown"' \
+  --min "2015-02-04 00:00:00" \
+  --min_border "exclude" \
+  --max "2015-02-05 00:00:00" \
+  --max_border "include"
+

  Added: test/command/suite/sharding/logical_count/condition/filter/min_include.expected (+48 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_count/condition/filter/min_include.expected    2015-02-05 11:09:38 +0900 (ffbae18)
@@ -0,0 +1,48 @@
+register sharding/search
+[[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 message COLUMN_SCALAR Text
+[[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 message COLUMN_SCALAR Text
+[[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 message COLUMN_SCALAR Text
+[[0,0.0,0.0],true]
+load --table Logs_20150203
+[
+{"timestamp": "2015-02-03 23:59:58", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:58", "message": "Shutdown"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Shutdown"}
+]
+[[0,0.0,0.0],4]
+load --table Logs_20150204
+[
+{"timestamp": "2015-02-04 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Shutdown"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Shutdown"}
+]
+[[0,0.0,0.0],6]
+load --table Logs_20150205
+[
+{"timestamp": "2015-02-05 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Shutdown"}
+]
+[[0,0.0,0.0],4]
+logical_count Logs timestamp   --filter 'message == "Shutdown"'   --min "2015-02-04 00:00:00"   --min_border "include"
+[[0,0.0,0.0],5]

  Added: test/command/suite/sharding/logical_count/condition/filter/min_include.test (+47 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_count/condition/filter/min_include.test    2015-02-05 11:09:38 +0900 (40beefb)
@@ -0,0 +1,47 @@
+#@on-error omit
+register sharding/search
+#@on-error default
+
+table_create Logs_20150203 TABLE_NO_KEY
+column_create Logs_20150203 timestamp COLUMN_SCALAR Time
+column_create Logs_20150203 message COLUMN_SCALAR Text
+
+table_create Logs_20150204 TABLE_NO_KEY
+column_create Logs_20150204 timestamp COLUMN_SCALAR Time
+column_create Logs_20150204 message COLUMN_SCALAR Text
+
+table_create Logs_20150205 TABLE_NO_KEY
+column_create Logs_20150205 timestamp COLUMN_SCALAR Time
+column_create Logs_20150205 message COLUMN_SCALAR Text
+
+load --table Logs_20150203
+[
+{"timestamp": "2015-02-03 23:59:58", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:58", "message": "Shutdown"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Shutdown"}
+]
+
+load --table Logs_20150204
+[
+{"timestamp": "2015-02-04 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Shutdown"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Shutdown"}
+]
+
+load --table Logs_20150205
+[
+{"timestamp": "2015-02-05 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Shutdown"}
+]
+
+logical_count Logs timestamp \
+  --filter 'message == "Shutdown"' \
+  --min "2015-02-04 00:00:00" \
+  --min_border "include"
+

  Added: test/command/suite/sharding/logical_count/condition/filter/min_include_max_exclude.expected (+48 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_count/condition/filter/min_include_max_exclude.expected    2015-02-05 11:09:38 +0900 (9b3fde0)
@@ -0,0 +1,48 @@
+register sharding/search
+[[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 message COLUMN_SCALAR Text
+[[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 message COLUMN_SCALAR Text
+[[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 message COLUMN_SCALAR Text
+[[0,0.0,0.0],true]
+load --table Logs_20150203
+[
+{"timestamp": "2015-02-03 23:59:58", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:58", "message": "Shutdown"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Shutdown"}
+]
+[[0,0.0,0.0],4]
+load --table Logs_20150204
+[
+{"timestamp": "2015-02-04 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Shutdown"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Shutdown"}
+]
+[[0,0.0,0.0],6]
+load --table Logs_20150205
+[
+{"timestamp": "2015-02-05 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Shutdown"}
+]
+[[0,0.0,0.0],4]
+logical_count Logs timestamp   --filter 'message == "Shutdown"'   --min "2015-02-04 00:00:00"   --min_border "include"   --max "2015-02-05 00:00:00"   --max_border "exclude"
+[[0,0.0,0.0],3]

  Added: test/command/suite/sharding/logical_count/condition/filter/min_include_max_exclude.test (+49 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_count/condition/filter/min_include_max_exclude.test    2015-02-05 11:09:38 +0900 (789c1f7)
@@ -0,0 +1,49 @@
+#@on-error omit
+register sharding/search
+#@on-error default
+
+table_create Logs_20150203 TABLE_NO_KEY
+column_create Logs_20150203 timestamp COLUMN_SCALAR Time
+column_create Logs_20150203 message COLUMN_SCALAR Text
+
+table_create Logs_20150204 TABLE_NO_KEY
+column_create Logs_20150204 timestamp COLUMN_SCALAR Time
+column_create Logs_20150204 message COLUMN_SCALAR Text
+
+table_create Logs_20150205 TABLE_NO_KEY
+column_create Logs_20150205 timestamp COLUMN_SCALAR Time
+column_create Logs_20150205 message COLUMN_SCALAR Text
+
+load --table Logs_20150203
+[
+{"timestamp": "2015-02-03 23:59:58", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:58", "message": "Shutdown"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Shutdown"}
+]
+
+load --table Logs_20150204
+[
+{"timestamp": "2015-02-04 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Shutdown"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Shutdown"}
+]
+
+load --table Logs_20150205
+[
+{"timestamp": "2015-02-05 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Shutdown"}
+]
+
+logical_count Logs timestamp \
+  --filter 'message == "Shutdown"' \
+  --min "2015-02-04 00:00:00" \
+  --min_border "include" \
+  --max "2015-02-05 00:00:00" \
+  --max_border "exclude"
+

  Added: test/command/suite/sharding/logical_count/condition/filter/min_include_max_include.expected (+48 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_count/condition/filter/min_include_max_include.expected    2015-02-05 11:09:38 +0900 (aa0793f)
@@ -0,0 +1,48 @@
+register sharding/search
+[[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 message COLUMN_SCALAR Text
+[[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 message COLUMN_SCALAR Text
+[[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 message COLUMN_SCALAR Text
+[[0,0.0,0.0],true]
+load --table Logs_20150203
+[
+{"timestamp": "2015-02-03 23:59:58", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:58", "message": "Shutdown"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Shutdown"}
+]
+[[0,0.0,0.0],4]
+load --table Logs_20150204
+[
+{"timestamp": "2015-02-04 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Shutdown"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Shutdown"}
+]
+[[0,0.0,0.0],6]
+load --table Logs_20150205
+[
+{"timestamp": "2015-02-05 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Shutdown"}
+]
+[[0,0.0,0.0],4]
+logical_count Logs timestamp   --filter 'message == "Shutdown"'   --min "2015-02-04 00:00:00"   --min_border "include"   --max "2015-02-05 00:00:00"   --max_border "include"
+[[0,0.0,0.0],4]

  Added: test/command/suite/sharding/logical_count/condition/filter/min_include_max_include.test (+49 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/sharding/logical_count/condition/filter/min_include_max_include.test    2015-02-05 11:09:38 +0900 (61a691f)
@@ -0,0 +1,49 @@
+#@on-error omit
+register sharding/search
+#@on-error default
+
+table_create Logs_20150203 TABLE_NO_KEY
+column_create Logs_20150203 timestamp COLUMN_SCALAR Time
+column_create Logs_20150203 message COLUMN_SCALAR Text
+
+table_create Logs_20150204 TABLE_NO_KEY
+column_create Logs_20150204 timestamp COLUMN_SCALAR Time
+column_create Logs_20150204 message COLUMN_SCALAR Text
+
+table_create Logs_20150205 TABLE_NO_KEY
+column_create Logs_20150205 timestamp COLUMN_SCALAR Time
+column_create Logs_20150205 message COLUMN_SCALAR Text
+
+load --table Logs_20150203
+[
+{"timestamp": "2015-02-03 23:59:58", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:58", "message": "Shutdown"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-03 23:59:59", "message": "Shutdown"}
+]
+
+load --table Logs_20150204
+[
+{"timestamp": "2015-02-04 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-04 00:00:01", "message": "Shutdown"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Start"},
+{"timestamp": "2015-02-04 23:59:59", "message": "Shutdown"}
+]
+
+load --table Logs_20150205
+[
+{"timestamp": "2015-02-05 00:00:00", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:00", "message": "Shutdown"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Start"},
+{"timestamp": "2015-02-05 00:00:01", "message": "Shutdown"}
+]
+
+logical_count Logs timestamp \
+  --filter 'message == "Shutdown"' \
+  --min "2015-02-04 00:00:00" \
+  --min_border "include" \
+  --max "2015-02-05 00:00:00" \
+  --max_border "include"
+
-------------- next part --------------
HTML����������������������������...
Download 



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