Skip to content

colexec: fix hash aggregator with nulls#45913

Merged
yuzefovich merged 1 commit intocockroachdb:masterfrom
yuzefovich:vec-fix-hashaggregator
Mar 9, 2020
Merged

colexec: fix hash aggregator with nulls#45913
yuzefovich merged 1 commit intocockroachdb:masterfrom
yuzefovich:vec-fix-hashaggregator

Conversation

@yuzefovich
Copy link
Copy Markdown
Member

Previously, we were incorrectly handling the matching of NULL values in
the grouping columns - we would short circuit only if only one of the
values is NULL. However, in case when both values are NULLs we also know
that they are not different. (Previously, we would be comparing the
garbage values that happened to be in the column cells corresponding to
NULL values in question.)

Fixes: #45905.

Release note: None

@yuzefovich yuzefovich requested review from a team and Azhng March 9, 2020 22:12
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Previously, we were incorrectly handling the matching of NULL values in
the grouping columns - we would short circuit only if only one of the
values is NULL. However, in case when both values are NULLs we also know
that they are not different. (Previously, we would be comparing the
garbage values that happened to be in the column cells corresponding to
NULL values in question.)

Release note: None
@yuzefovich yuzefovich force-pushed the vec-fix-hashaggregator branch from cefb3bf to 3c200c2 Compare March 9, 2020 22:25
Copy link
Copy Markdown
Contributor

@Azhng Azhng left a comment

Choose a reason for hiding this comment

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

:lgtm:

Thanks for the fix!

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @Azhng)

@yuzefovich
Copy link
Copy Markdown
Member Author

TFTR!

@yuzefovich yuzefovich merged commit 26ed00b into cockroachdb:master Mar 9, 2020
@yuzefovich yuzefovich deleted the vec-fix-hashaggregator branch March 9, 2020 23:11
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.

sql: TestLogic/fakedist-disk/aggregate/string_agg is flaky

3 participants