[Groonga-commit] groonga/groonga at 99e467b [master] logical_count: use "_" as separator instead of "@"

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Feb 3 14:50:27 JST 2015


Kouhei Sutou	2015-02-03 14:50:27 +0900 (Tue, 03 Feb 2015)

  New Revision: 99e467b514cf288ffc54e80bec11e6e5e761b000
  https://github.com/groonga/groonga/commit/99e467b514cf288ffc54e80bec11e6e5e761b000

  Message:
    logical_count: use "_" as separator instead of "@"
    
    Because "@" can't be used in `match_columns`.

  Modified files:
    plugins/sharding/search.rb
    test/command/suite/sharding/logical_count/condition/none/multiple_phisical_tables.expected
    test/command/suite/sharding/logical_count/condition/none/multiple_phisical_tables.test
    test/command/suite/sharding/logical_count/condition/none/one_physical_table.expected
    test/command/suite/sharding/logical_count/condition/none/one_physical_table.test

  Modified: plugins/sharding/search.rb (+1 -1)
===================================================================
--- plugins/sharding/search.rb    2015-02-03 13:08:21 +0900 (7b3cd4f)
+++ plugins/sharding/search.rb    2015-02-03 14:50:27 +0900 (ae353d6)
@@ -19,7 +19,7 @@ module Groonga
         end
 
         total = 0
-        context.database.each_table do |table|
+        context.database.each_table(:prefix => "#{logical_table}_") do |table|
           total += table.size
         end
         output(total)

  Modified: test/command/suite/sharding/logical_count/condition/none/multiple_phisical_tables.expected (+9 -9)
===================================================================
--- test/command/suite/sharding/logical_count/condition/none/multiple_phisical_tables.expected    2015-02-03 13:08:21 +0900 (708f486)
+++ test/command/suite/sharding/logical_count/condition/none/multiple_phisical_tables.expected    2015-02-03 14:50:27 +0900 (ff157ba)
@@ -1,29 +1,29 @@
 register sharding/search
 [[0,0.0,0.0],true]
-table_create Logs �� 20150203 TABLE_NO_KEY
+table_create Logs_20150203 TABLE_NO_KEY
 [[0,0.0,0.0],true]
-column_create Logs �� 20150203 timestamp COLUMN_SCALAR Time
+column_create Logs_20150203 timestamp COLUMN_SCALAR Time
 [[0,0.0,0.0],true]
-table_create Logs �� 20150204 TABLE_NO_KEY
+table_create Logs_20150204 TABLE_NO_KEY
 [[0,0.0,0.0],true]
-column_create Logs �� 20150204 timestamp COLUMN_SCALAR Time
+column_create Logs_20150204 timestamp COLUMN_SCALAR Time
 [[0,0.0,0.0],true]
-table_create Logs �� 20150205 TABLE_NO_KEY
+table_create Logs_20150205 TABLE_NO_KEY
 [[0,0.0,0.0],true]
-column_create Logs �� 20150205 timestamp COLUMN_SCALAR Time
+column_create Logs_20150205 timestamp COLUMN_SCALAR Time
 [[0,0.0,0.0],true]
-load --table Logs �� 20150203
+load --table Logs_20150203
 [
 {"timestamp": "2015-02-03 12:49:00"}
 ]
 [[0,0.0,0.0],1]
-load --table Logs �� 20150204
+load --table Logs_20150204
 [
 {"timestamp": "2015-02-04 13:49:00"},
 {"timestamp": "2015-02-04 13:50:00"}
 ]
 [[0,0.0,0.0],2]
-load --table Logs �� 20150205
+load --table Logs_20150205
 [
 {"timestamp": "2015-02-05 13:49:00"},
 {"timestamp": "2015-02-05 13:50:00"},

  Modified: test/command/suite/sharding/logical_count/condition/none/multiple_phisical_tables.test (+9 -9)
===================================================================
--- test/command/suite/sharding/logical_count/condition/none/multiple_phisical_tables.test    2015-02-03 13:08:21 +0900 (82c50d3)
+++ test/command/suite/sharding/logical_count/condition/none/multiple_phisical_tables.test    2015-02-03 14:50:27 +0900 (0c607aa)
@@ -2,27 +2,27 @@
 register sharding/search
 #@on-error default
 
-table_create Logs �� 20150203 TABLE_NO_KEY
-column_create Logs �� 20150203 timestamp COLUMN_SCALAR Time
+table_create Logs_20150203 TABLE_NO_KEY
+column_create Logs_20150203 timestamp COLUMN_SCALAR Time
 
-table_create Logs �� 20150204 TABLE_NO_KEY
-column_create Logs �� 20150204 timestamp COLUMN_SCALAR Time
+table_create Logs_20150204 TABLE_NO_KEY
+column_create Logs_20150204 timestamp COLUMN_SCALAR Time
 
-table_create Logs �� 20150205 TABLE_NO_KEY
-column_create Logs �� 20150205 timestamp COLUMN_SCALAR Time
+table_create Logs_20150205 TABLE_NO_KEY
+column_create Logs_20150205 timestamp COLUMN_SCALAR Time
 
-load --table Logs �� 20150203
+load --table Logs_20150203
 [
 {"timestamp": "2015-02-03 12:49:00"}
 ]
 
-load --table Logs �� 20150204
+load --table Logs_20150204
 [
 {"timestamp": "2015-02-04 13:49:00"},
 {"timestamp": "2015-02-04 13:50:00"}
 ]
 
-load --table Logs �� 20150205
+load --table Logs_20150205
 [
 {"timestamp": "2015-02-05 13:49:00"},
 {"timestamp": "2015-02-05 13:50:00"},

  Modified: test/command/suite/sharding/logical_count/condition/none/one_physical_table.expected (+3 -3)
===================================================================
--- test/command/suite/sharding/logical_count/condition/none/one_physical_table.expected    2015-02-03 13:08:21 +0900 (0613bb6)
+++ test/command/suite/sharding/logical_count/condition/none/one_physical_table.expected    2015-02-03 14:50:27 +0900 (f40e5c5)
@@ -1,10 +1,10 @@
 register sharding/search
 [[0,0.0,0.0],true]
-table_create Logs �� 20150203 TABLE_NO_KEY
+table_create Logs_20150203 TABLE_NO_KEY
 [[0,0.0,0.0],true]
-column_create Logs �� 20150203 timestamp COLUMN_SCALAR Time
+column_create Logs_20150203 timestamp COLUMN_SCALAR Time
 [[0,0.0,0.0],true]
-load --table Logs �� 20150203
+load --table Logs_20150203
 [
 {"timestamp": "2015-02-03 12:49:00"},
 {"timestamp": "2015-02-03 12:50:00"},

  Modified: test/command/suite/sharding/logical_count/condition/none/one_physical_table.test (+3 -3)
===================================================================
--- test/command/suite/sharding/logical_count/condition/none/one_physical_table.test    2015-02-03 13:08:21 +0900 (ecd3bd1)
+++ test/command/suite/sharding/logical_count/condition/none/one_physical_table.test    2015-02-03 14:50:27 +0900 (265b095)
@@ -2,10 +2,10 @@
 register sharding/search
 #@on-error default
 
-table_create Logs �� 20150203 TABLE_NO_KEY
-column_create Logs �� 20150203 timestamp COLUMN_SCALAR Time
+table_create Logs_20150203 TABLE_NO_KEY
+column_create Logs_20150203 timestamp COLUMN_SCALAR Time
 
-load --table Logs �� 20150203
+load --table Logs_20150203
 [
 {"timestamp": "2015-02-03 12:49:00"},
 {"timestamp": "2015-02-03 12:50:00"},
-------------- next part --------------
HTML����������������������������...
Download 



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