[Groonga-commit] groonga/groonga at 8afbd98 [master] logical_count: don't use needless guard if

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Feb 4 18:35:43 JST 2015


Kouhei Sutou	2015-02-04 18:35:43 +0900 (Wed, 04 Feb 2015)

  New Revision: 8afbd98fe5a63228f9e60aeaea24c945d6c68beb
  https://github.com/groonga/groonga/commit/8afbd98fe5a63228f9e60aeaea24c945d6c68beb

  Message:
    logical_count: don't use needless guard if

  Modified files:
    plugins/sharding/search.rb

  Modified: plugins/sharding/search.rb (+5 -2)
===================================================================
--- plugins/sharding/search.rb    2015-02-04 18:35:31 +0900 (dfe7709)
+++ plugins/sharding/search.rb    2015-02-04 18:35:43 +0900 (4d7e149)
@@ -51,8 +51,11 @@ module Groonga
         when :none
           0
         when :all
-          return table.size if filter.nil?
-          filtered_count_n_records(table, filter)
+          if filter.nil?
+            table.size
+          else
+            filtered_count_n_records(table, filter)
+          end
         when :partial_min
           filtered_count_n_records(table, filter) do |expression|
             expression.append_constant(shard_key, Operator::PUSH, 1)
-------------- next part --------------
HTML����������������������������...
Download 



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