fix(node): handle null values in nullable boolean fields#2657
Merged
wjones127 merged 3 commits intolancedb:mainfrom Sep 23, 2025
Merged
fix(node): handle null values in nullable boolean fields#2657wjones127 merged 3 commits intolancedb:mainfrom
wjones127 merged 3 commits intolancedb:mainfrom
Conversation
wjones127
requested changes
Sep 15, 2025
Contributor
wjones127
left a comment
There was a problem hiding this comment.
This seems like it should work. Could you add a unit test for it though?
| // biome-ignore lint/suspicious/noExplicitAny: skip | ||
| ): Vector<any> { | ||
| if (type !== undefined) { | ||
| if (DataType.isBool(type)) { |
Contributor
There was a problem hiding this comment.
Could you add a comment saying this is a workaround for this issue in arrow? That way we can one day remove once this is fixed upstream.
Suggested change
| if (DataType.isBool(type)) { | |
| // Workaround for: https://github.com/apache/arrow-js/issues/68 | |
| if (DataType.isBool(type)) { |
…dling - Add GitHub issue reference for the arrow-js workaround - Add unit tests for null boolean values and mixed boolean arrays - Addresses reviewer feedback
Contributor
Author
|
@wjones127 |
wjones127
approved these changes
Sep 23, 2025
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.
Solution
Added special handling in
makeVectorfunction for boolean arrays where all values are null. The fix creates a proper null bitmap usingmakeDataandarrowMakeVectorinstead of relying on Apache Arrow'svectorFromArraywhich doesn't handle this edge case correctly.fixes: #2644
Changes
Added null value detection for boolean types in
makeVectorfunctionCreates proper Arrow data structure with null bitmap when all boolean values are null
Preserves existing behavior for non-null boolean values and other data types
Fixes the boolean null value bug while maintaining backward compatibility.