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

Issue #5669: Advance NULL Pointers #5793

Merged
merged 3 commits into from
Dec 30, 2022
Merged

Conversation

hawkfish
Copy link
Contributor

The comparators were not advancing pointers
when two NULL elements of a struct compared as equal,
causing the rest of the scan to be misaligned.

The test case (that took me ~8 hours to generate...)
had to have the same layout as the original data
but be obfuscated, hence the rather nasty example.

The Window operator was an innocent bystander here -
the bug is in the comparison logic when comparing two complex,
identical structs from the original data set that got unnested
into duplicates and then sorted. Since they were equal, the entire
data structure had to be scanned, but once the pointers became
misaligned, it took a while for something bad to actually happen.

Richard Wesley added 3 commits December 23, 2022 20:10
The comparators wre not advancing pointers
when two NULL elements of a struct compared as equal,
causing the rest of the scan to be misaligned.

Test coming but the repro case was very nasty.
Fun test case that took me ~8 hours to generate...
@hawkfish
Copy link
Contributor Author

fixes #5669

@hannes hannes merged commit c3791b6 into duckdb:master Dec 30, 2022
@hawkfish hawkfish deleted the comparator-nulls branch December 30, 2022 16:38
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.

None yet

2 participants