Make from_arrow not panic#8242
Merged
Merged
Conversation
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
connortsui20
commented
Jun 3, 2026
Comment on lines
+498
to
+504
| let null_count = nulls.map(NullBuffer::null_count).unwrap_or(0); | ||
| vortex_ensure_eq!( | ||
| null_count, | ||
| 0, | ||
| "Cannot convert an Arrow array containing {null_count} nulls into a non-nullable Vortex array" | ||
| ); | ||
| Ok(Validity::NonNullable) |
Contributor
Author
There was a problem hiding this comment.
This was the main reason for this change, it doesn't make much sense to assert when basically all callers return results
Merging this PR will improve performance by 16.11%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | bitwise_not_vortex_buffer_mut[128] |
246.1 ns | 275.3 ns | -10.6% |
| ⚡ | Simulation | chunked_bool_canonical_into[(1000, 10)] |
45.2 µs | 30.3 µs | +49.28% |
| ⚡ | Simulation | chunked_varbinview_into_canonical[(1000, 10)] |
212.2 µs | 175.8 µs | +20.7% |
| ⚡ | Simulation | chunked_varbinview_canonical_into[(100, 100)] |
308.3 µs | 273.3 µs | +12.82% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing ct/from-arrow (555566e) with develop (a958108)
robert3005
approved these changes
Jun 3, 2026
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.
Summary
Removes the assertion in the
nullsfunction so thatfrom_arrowerrors instead of panicking if thenullabledoes not match the actually nullability of the arrow array.Also documents the
FromArrowArraytrait and method.Testing
2 basic unit tests.