Skip to content

Commit

Permalink
mrb: support directly index column in between
Browse files Browse the repository at this point in the history
  • Loading branch information
naoa committed Jul 13, 2017
1 parent 4ab29e2 commit 789e737
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/mrb/scripts/expression_tree/function_call.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ def estimate_size(table)

column, min, min_border, max, max_border = @arguments

index_info = column.column.find_index(Operator::CALL)
return table.size if index_info.nil?
index_column = index_info.index
if column.is_a?(Groonga::ExpressionTree::IndexColumn)
index_column = column.object
else
index_info = column.column.find_index(Operator::CALL)
return table.size if index_info.nil?
index_column = index_info.index
end

while index_column.is_a?(Groonga::Accessor)
if index_column.have_next?
index_column = index_column.next
Expand Down

0 comments on commit 789e737

Please sign in to comment.