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

release-2.1: distsql: don't use sortTopK when filter is present #31190

Merged
merged 1 commit into from
Oct 11, 2018

Conversation

solongordon
Copy link
Contributor

Backport 1/1 commits from #31189.

/cc @cockroachdb/release


The sorter was producing incorrect results when both a limit and a
filter were applied. We can't use sortTopK in this case since some
results may be filtered out in post-processing. Note this scenario is
somewhat rare because typically the filter would be pushed down below
the sort. The issue was observed when selecting from the result of a
SHOW TRACE.

Also removed a bit of dead code.

Fixes #31163

Release note: None

@solongordon solongordon requested review from RaduBerinde and a team October 10, 2018 15:27
@cockroach-teamcity
Copy link
Member

This change is Reviewable

The sorter was producing incorrect results when both a limit and a
filter were applied. We can't use sortTopK in this case since some
results may be filtered out in post-processing. Note this scenario is
somewhat rare because typically the filter would be pushed down below
the sort. The issue was observed when selecting from the result of a
SHOW TRACE.

Also removed a bit of dead code.

Fixes cockroachdb#31163

Release note: None
@solongordon solongordon merged commit 6680582 into cockroachdb:release-2.1 Oct 11, 2018
@solongordon solongordon deleted the backport2.1-31189 branch October 12, 2018 12:00
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.

4 participants