Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logical_range_filter: Make result_sets enumeration sharable #1346

Merged
merged 4 commits into from
Mar 31, 2022

Conversation

HashidaTKS
Copy link
Contributor

logical_range_filter: Make result_sets enumeration sharable on StreamShardExecutor

@@ -43,6 +43,28 @@ def have_record?
true
end

protected
def enumerate_result_sets
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each_result_set is better for Ruby.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have renamed it.

@@ -43,6 +43,28 @@ def have_record?
true
end

protected
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it needed?
Generally, protected isn't used in Ruby.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, protected isn't used in Ruby.

I see. (I didn't know that.)

I have removed this method access modifier.

end
each_result_set do |result_set|
sort_result_set(result_set)
return if @window && @context.current_limit.zero?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is @window && needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had added this just because originally @context.current_limit.zero? was executed only when @window.
However, even removing @window &&, all logical_range_filter tests were passed.
So I have removed this @window &&.

@kou kou merged commit 084389f into groonga:master Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants