Skip to content

colexec: fix a bug with top K sort not handling K > 1024#42831

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
yuzefovich:fix-vec-topk
Nov 27, 2019
Merged

colexec: fix a bug with top K sort not handling K > 1024#42831
craig[bot] merged 1 commit intocockroachdb:masterfrom
yuzefovich:fix-vec-topk

Conversation

@yuzefovich
Copy link
Copy Markdown
Member

@yuzefovich yuzefovich commented Nov 27, 2019

Previously, top K sorter when emitting the data would copy always from
the beginning of the stored vectors. This is incorrect behavior when
K is greater than coldata.BatchSize(), and now this has been fixed.

Fixes: #42816.

Release note (bug fix): A bug with incorrect handling of Top K sort by
the vectorized engine when K is greater than 1024 has been fixed.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Previously, top K sorter when emitting the data would copy always from
the beginning of the stored vectors. This is incorrect behavior when
K is greater than coldata.BatchSize(), and now this has been fixed.

Release note (bug fix): A bug with incorrect handling of Top K sort by
the vectorized engine when K is greater than 1024 has been fixed.
Copy link
Copy Markdown
Member

@jordanlewis jordanlewis left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix!

@yuzefovich
Copy link
Copy Markdown
Member Author

TFTR!

bors r+

craig bot pushed a commit that referenced this pull request Nov 27, 2019
42797: sql: fix ALTER INDEX IF EXISTS for non-existing index r=rafiss a=rafiss

Previously, if ALTER INDEX IF EXISTS was used on an
unqualified index name that did not match any index, the database would
return an "index does not exist" error.

Now, the statement succeeds, but does nothing.

Also, test edge cases around ambiguous, non-existing, and/or unqualified
index names, in both alter_index and drop_index logic tests.

Fixes #42399 

Release note (bug fix): ALTER INDEX IF EXISTS no longer fails
when using an unqualified index name that does not match any existing
index. Now it is a no-op.

42831: colexec: fix a bug with top K sort not handling K > 1024 r=yuzefovich a=yuzefovich

Previously, top K sorter when emitting the data would copy always from
the beginning of the stored vectors. This is incorrect behavior when
K is greater than coldata.BatchSize(), and now this has been fixed.

Fixes: #42816.

Release note (bug fix): A bug with incorrect handling of Top K sort by
the vectorized engine when K is greater than 1024 has been fixed.

42835: workload, roachtest: skip TPCH Q4 for vec on r=yuzefovich a=yuzefovich

TPCH query 4 in some cases can hit a memory limit error, so we will skip
it for now (until the disk spilling is put in place).

Release note: None

Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com>
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 27, 2019

Build succeeded

@craig craig bot merged commit 4b4e7da into cockroachdb:master Nov 27, 2019
@yuzefovich yuzefovich deleted the fix-vec-topk branch February 3, 2020 22:05
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.

Faulty pagination in ordered query with over 1024 results

3 participants