fix: Properly handle nulls in TopOrderable - #61
Merged
Conversation
stuhood
force-pushed
the
stuhood.top-orderable-null-handling
branch
from
September 3, 2025 17:57
bf16ca4 to
7daf4e0
Compare
Collaborator
Author
|
Commits are useful to review independently: I additionally needed to adjust the unit tests to:
|
eeeebbbbrrrr
approved these changes
Sep 3, 2025
stuhood
added a commit
that referenced
this pull request
Sep 3, 2025
Adjusts `Feature` to use `Option` where necessary. `StringFeature::SegmentOutput` avoids being wrapped in an `Option` because the `u64::MAX` "niche" is safe to use in that case (since it would require that many terms to trigger a collision). Surprisingly, no performance impact downstream. I additionally needed to adjust the unit tests to: * include a NULL * use a stable id, because for some reason at three segments (but not two?) the fact that segment ords are not stable was exposed.
stuhood
added a commit
that referenced
this pull request
Sep 3, 2025
Adjusts `Feature` to use `Option` where necessary. `StringFeature::SegmentOutput` avoids being wrapped in an `Option` because the `u64::MAX` "niche" is safe to use in that case (since it would require that many terms to trigger a collision). Surprisingly, no performance impact downstream. I additionally needed to adjust the unit tests to: * include a NULL * use a stable id, because for some reason at three segments (but not two?) the fact that segment ords are not stable was exposed.
stuhood
added a commit
to paradedb/paradedb
that referenced
this pull request
Sep 3, 2025
## What TopN was not handling nulls properly: instead, they were filled in with a default, which would cause an error when the limit was high enough to include them. ## How See paradedb/tantivy#61. ## Tests Added a regression test and property tests (which exposed a related issue in pushdown: #3110).
github-actions Bot
pushed a commit
to paradedb/paradedb
that referenced
this pull request
Sep 3, 2025
## What TopN was not handling nulls properly: instead, they were filled in with a default, which would cause an error when the limit was high enough to include them. ## How See paradedb/tantivy#61. ## Tests Added a regression test and property tests (which exposed a related issue in pushdown: #3110).
stuhood
added a commit
to paradedb/paradedb
that referenced
this pull request
Sep 3, 2025
## What TopN was not handling nulls properly: instead, they were filled in with a default, which would cause an error when the limit was high enough to include them. ## How See paradedb/tantivy#61. ## Tests Added a regression test and property tests (which exposed a related issue in pushdown: #3110). --------- Co-authored-by: Stu Hood <stuhood@paradedb.com> Co-authored-by: Stu Hood <stuhood@gmail.com>
mdashti
pushed a commit
that referenced
this pull request
Oct 21, 2025
Adjusts `Feature` to use `Option` where necessary. `StringFeature::SegmentOutput` avoids being wrapped in an `Option` because the `u64::MAX` "niche" is safe to use in that case (since it would require that many terms to trigger a collision). Surprisingly, no performance impact downstream. I additionally needed to adjust the unit tests to: * include a NULL * use a stable id, because for some reason at three segments (but not two?) the fact that segment ords are not stable was exposed.
mdashti
pushed a commit
that referenced
this pull request
Oct 22, 2025
Adjusts `Feature` to use `Option` where necessary. `StringFeature::SegmentOutput` avoids being wrapped in an `Option` because the `u64::MAX` "niche" is safe to use in that case (since it would require that many terms to trigger a collision). Surprisingly, no performance impact downstream. I additionally needed to adjust the unit tests to: * include a NULL * use a stable id, because for some reason at three segments (but not two?) the fact that segment ords are not stable was exposed.
mdashti
pushed a commit
that referenced
this pull request
Oct 22, 2025
Adjusts `Feature` to use `Option` where necessary. `StringFeature::SegmentOutput` avoids being wrapped in an `Option` because the `u64::MAX` "niche" is safe to use in that case (since it would require that many terms to trigger a collision). Surprisingly, no performance impact downstream. I additionally needed to adjust the unit tests to: * include a NULL * use a stable id, because for some reason at three segments (but not two?) the fact that segment ords are not stable was exposed.
mdashti
pushed a commit
that referenced
this pull request
Dec 3, 2025
Adjusts `Feature` to use `Option` where necessary. `StringFeature::SegmentOutput` avoids being wrapped in an `Option` because the `u64::MAX` "niche" is safe to use in that case (since it would require that many terms to trigger a collision). Surprisingly, no performance impact downstream. I additionally needed to adjust the unit tests to: * include a NULL * use a stable id, because for some reason at three segments (but not two?) the fact that segment ords are not stable was exposed.
mdashti
pushed a commit
that referenced
this pull request
Dec 3, 2025
Adjusts `Feature` to use `Option` where necessary. `StringFeature::SegmentOutput` avoids being wrapped in an `Option` because the `u64::MAX` "niche" is safe to use in that case (since it would require that many terms to trigger a collision). Surprisingly, no performance impact downstream. I additionally needed to adjust the unit tests to: * include a NULL * use a stable id, because for some reason at three segments (but not two?) the fact that segment ords are not stable was exposed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adjusts
Featureto useOptionwhere necessary.StringFeature::SegmentOutputavoids being wrapped in anOptionbecause theu64::MAX"niche" is safe to use in that case (since it would require that many terms to trigger a collision).Surprisingly, no performance impact downstream.