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

Projects
None yet
4 participants
@solongordon
Contributor

solongordon commented Oct 10, 2018

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 a review from RaduBerinde Oct 10, 2018

@solongordon solongordon requested review from cockroachdb/distsql-prs as code owners Oct 10, 2018

@cockroach-teamcity

This comment has been minimized.

Show comment
Hide comment
@cockroach-teamcity

cockroach-teamcity Oct 10, 2018

Member

This change is Reviewable

Member

cockroach-teamcity commented Oct 10, 2018

This change is Reviewable

distsql: don't use sortTopK when filter is present
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 merged commit 6680582 into cockroachdb:release-2.1 Oct 11, 2018

2 checks passed

GitHub CI (Cockroach) TeamCity build finished
Details
license/cla Contributor License Agreement is signed.
Details

@solongordon solongordon deleted the solongordon:backport2.1-31189 branch Oct 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment