[Groonga-commit] droonga/fluent-plugin-droonga at 64f7d00 [master] Follow DistributedSearchPlanner change

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Jan 30 14:24:36 JST 2014


Kouhei Sutou	2014-01-30 14:24:36 +0900 (Thu, 30 Jan 2014)

  New Revision: 64f7d0062862a09e53d408c8c7fc4e3726303559
  https://github.com/droonga/fluent-plugin-droonga/commit/64f7d0062862a09e53d408c8c7fc4e3726303559

  Message:
    Follow DistributedSearchPlanner change
    
    It supports errors.

  Modified files:
    test/unit/plugin/distributor/test_search_planner.rb

  Modified: test/unit/plugin/distributor/test_search_planner.rb (+23 -16)
===================================================================
--- test/unit/plugin/distributor/test_search_planner.rb    2014-01-30 14:09:02 +0900 (fc532af)
+++ test/unit/plugin/distributor/test_search_planner.rb    2014-01-30 14:24:36 +0900 (d3d2007)
@@ -68,6 +68,12 @@ class DistributedSearchPlannerTest < Test::Unit::TestCase
       expected_plan << {
         "type" => "search_reduce",
         "body" => {
+          "errors" => {
+            "errors_reduced" => {
+              "limit" => -1,
+              "type"  => "sum",
+            }
+          },
           "query1" => {
             "query1_reduced" => {
               "count" => {
@@ -80,13 +86,6 @@ class DistributedSearchPlannerTest < Test::Unit::TestCase
               },
             },
           },
-        },
-        "inputs" => ["query1"],
-        "outputs" => ["query1_reduced"],
-      }
-      expected_plan << {
-        "type" => "search_reduce",
-        "body" => {
           "query2" => {
             "query2_reduced" => {
               "count" => {
@@ -99,13 +98,6 @@ class DistributedSearchPlannerTest < Test::Unit::TestCase
               },
             },
           },
-        },
-        "inputs" => ["query2"],
-        "outputs" => ["query2_reduced"],
-      }
-      expected_plan << {
-        "type" => "search_reduce",
-        "body" => {
           "query3" => {
             "query3_reduced" => {
               "count" => {
@@ -119,13 +111,26 @@ class DistributedSearchPlannerTest < Test::Unit::TestCase
             },
           },
         },
-        "inputs" => ["query3"],
-        "outputs" => ["query3_reduced"],
+        "inputs" => [
+          "errors",
+          "query1",
+          "query2",
+          "query3",
+        ],
+        "outputs" => [
+          "errors_reduced",
+          "query1_reduced",
+          "query2_reduced",
+          "query3_reduced",
+        ],
       }
 
       gatherer = {
         "type" => "search_gather",
         "body" => {
+          "errors_reduced" => {
+            "output" => "errors",
+          },
           "query1_reduced" => {
             "output" => "query1",
             "elements" => {
@@ -164,6 +169,7 @@ class DistributedSearchPlannerTest < Test::Unit::TestCase
           },
         },
         "inputs" => [
+          "errors_reduced",
           "query1_reduced",
           "query2_reduced",
           "query3_reduced",
@@ -211,6 +217,7 @@ class DistributedSearchPlannerTest < Test::Unit::TestCase
           },
         },
         "outputs" => [
+          "errors",
           "query1",
           "query2",
           "query3",
-------------- next part --------------
HTML����������������������������...
Download 



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