[Groonga-commit] groonga/groonga at a5f4c09 [master] mrb: simplify

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Feb 23 16:17:46 JST 2015


Kouhei Sutou	2015-02-23 16:17:46 +0900 (Mon, 23 Feb 2015)

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

  Message:
    mrb: simplify

  Modified files:
    lib/mrb/scripts/expression_size_estimator.rb

  Modified: lib/mrb/scripts/expression_size_estimator.rb (+2 -5)
===================================================================
--- lib/mrb/scripts/expression_size_estimator.rb    2015-02-23 14:57:14 +0900 (0dd3136)
+++ lib/mrb/scripts/expression_size_estimator.rb    2015-02-23 16:17:46 +0900 (c1a84de)
@@ -51,9 +51,7 @@ module Groonga
     def estimate_data(data)
       search_index = data.search_indexes.first
       size = nil
-      if search_index.nil?
-        size = @table_size
-      else
+      if search_index
         case data.op
         when Operator::MATCH
           size = estimate_match(data, search_index)
@@ -70,9 +68,8 @@ module Groonga
             size = estimate_between(data, search_index)
           end
         end
-        size ||= @table_size
       end
-      size
+      size || @table_size
     end
 
     def estimate_match(data, search_index)
-------------- next part --------------
HTML����������������������������...
Download 



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