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

colexec: fix cfetcher with interleaved tables with NULL in key #47035

Merged
merged 1 commit into from
Apr 6, 2020

Conversation

yuzefovich
Copy link
Member

@yuzefovich yuzefovich commented Apr 4, 2020

Previously cFetcher could decode an interleaved table's NULL value
which would set the NULL in the corresponding column vector but would
not unset the null while it should have.

Fixes: #47029.

Release note (bug fix): Previously, CockroachDB could incorrectly
consider non-NULL value from an interleaved parent table to be NULL when
the interleaved child has NULL value in the row with the corresponding
index key, and now this has been fixed.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rohany
Copy link
Contributor

rohany commented Apr 4, 2020

I don't like that we have to iterate over all the columns here when we skip a k/v due to it being interleaved. I think instead when we actually decode the k/v into values we should reset the null before decoding the key, so that previous null writes don't shadow the decoded value.

@yuzefovich
Copy link
Member Author

Good point, updated.

@blathers-crl
Copy link

blathers-crl bot commented Apr 6, 2020

❌ The GitHub CI (Cockroach) build has failed on 01048105.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. I am experimental - my owner is otan.

Previously `cFetcher` could decode an interleaved table's `NULL` value
which would set the NULL in the corresponding column vector but would
not unset the null while it should have.

Release note (bug fix): Previously, CockroachDB could incorrectly
consider non-NULL value from an interleaved parent table to be NULL when
the interleaved child has NULL value in the row with the corresponding
index key, and now this has been fixed.
@yuzefovich
Copy link
Member Author

TFTR!

bors r+

@blathers-crl
Copy link

blathers-crl bot commented Apr 6, 2020

❌ The GitHub CI (Cockroach) build has failed on 732f92d8.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. I am experimental - my owner is otan.

@yuzefovich
Copy link
Member Author

bors r+

@craig
Copy link
Contributor

craig bot commented Apr 6, 2020

Build succeeded

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.

Incorrect result for query on interleaved index when vectorize=on
3 participants