Skip to content

Conversation

@connortsui20
Copy link
Contributor

@connortsui20 connortsui20 commented Oct 27, 2025

Tracking Issue: #5028

Adds StructVector and StructVectorMut.

Note: It would be really nice to have something like serde values that we can iterate and take as an iterator to construct these struct vectors, otherwise we are left with what I currently have on this PR, which imo is very unwieldy. This can come in a later PR though.

The second commit fixes some errors and also removes all of the new functions for vectors (as per an offline discussion with @gatesn).

@connortsui20 connortsui20 added the feature Release label indicating a new feature or request label Oct 27, 2025
@connortsui20 connortsui20 mentioned this pull request Oct 27, 2025
39 tasks
@connortsui20 connortsui20 requested a review from gatesn October 27, 2025 21:15
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 27, 2025

CodSpeed Performance Report

Merging #5094 will improve performances by 18.71%

Comparing ct/struct-vector (5cab7d0) with develop (60ce4b5)1

Summary

⚡ 74 improvements
✅ 1244 untouched
🆕 7 new
⏩ 29 skipped2

Benchmarks breakdown

Benchmark BASE HEAD Change
chunked_dict_primitive_canonical_into[f32, (1000, 10, 10)] 107.8 µs 94.7 µs +13.84%
chunked_dict_primitive_canonical_into[f32, (1000, 10, 100)] 837.1 µs 728.7 µs +14.88%
chunked_dict_primitive_canonical_into[f32, (1000, 100, 10)] 106.6 µs 93.7 µs +13.82%
chunked_dict_primitive_canonical_into[f32, (1000, 100, 100)] 840.7 µs 733.5 µs +14.6%
chunked_dict_primitive_canonical_into[f32, (1000, 1000, 10)] 127.9 µs 114.6 µs +11.65%
chunked_dict_primitive_canonical_into[f32, (1000, 1000, 100)] 1,023.2 µs 913.8 µs +11.98%
chunked_dict_primitive_canonical_into[f64, (1000, 10, 10)] 136.1 µs 122.1 µs +11.44%
chunked_dict_primitive_canonical_into[f64, (1000, 10, 100)] 1,071.3 µs 958 µs +11.83%
chunked_dict_primitive_canonical_into[f64, (1000, 100, 10)] 139.6 µs 125.7 µs +11.08%
chunked_dict_primitive_canonical_into[f64, (1000, 100, 100)] 1.1 ms 1 ms +11.13%
chunked_dict_primitive_canonical_into[u32, (1000, 10, 10)] 108.3 µs 95 µs +14.04%
chunked_dict_primitive_canonical_into[u32, (1000, 10, 100)] 840.7 µs 732.2 µs +14.82%
chunked_dict_primitive_canonical_into[u32, (1000, 100, 10)] 109.6 µs 96.3 µs +13.81%
chunked_dict_primitive_canonical_into[u32, (1000, 100, 100)] 845.1 µs 738.2 µs +14.48%
chunked_dict_primitive_canonical_into[u32, (1000, 1000, 10)] 128.6 µs 115.1 µs +11.67%
chunked_dict_primitive_canonical_into[u32, (1000, 1000, 100)] 1,004.3 µs 897 µs +11.96%
chunked_dict_primitive_canonical_into[u64, (1000, 10, 10)] 135.9 µs 122.5 µs +10.99%
chunked_dict_primitive_canonical_into[u64, (1000, 10, 100)] 1,105 µs 995.1 µs +11.04%
chunked_dict_primitive_canonical_into[u64, (1000, 100, 10)] 137.7 µs 124.3 µs +10.79%
chunked_dict_primitive_canonical_into[u64, (1000, 100, 100)] 1.1 ms 1 ms +10.76%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Footnotes

  1. No successful run was found on develop (1c01fae) during the generation of this report, so 60ce4b5 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 29 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

❌ Patch coverage is 72.85714% with 152 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.68%. Comparing base (60ce4b5) to head (5cab7d0).
⚠️ Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
vortex-vector/src/struct_/vector.rs 58.22% 33 Missing ⚠️
vortex-vector/src/struct_/vector_mut.rs 91.22% 33 Missing ⚠️
vortex-vector/src/vector_mut.rs 27.27% 32 Missing ⚠️
vortex-vector/src/vector.rs 0.00% 30 Missing ⚠️
vortex-vector/src/primitive/generic.rs 0.00% 5 Missing ⚠️
vortex-vector/src/bool/vector.rs 20.00% 4 Missing ⚠️
vortex-vector/src/bool/vector_mut.rs 20.00% 4 Missing ⚠️
vortex-vector/src/primitive/generic_mut.rs 20.00% 4 Missing ⚠️
vortex-compute/src/filter/bool.rs 0.00% 3 Missing ⚠️
vortex-vector/src/struct_/mod.rs 50.00% 3 Missing ⚠️
... and 1 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

///
/// This is stored here as a convenience, and also helps in the case that the `StructVector` has
/// no fields.
pub(super) len: usize,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The length is actually stored in validity, so this isn't necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is nice for a convenience. And also while this isn't exactly the same problem, storing length in the validity is what caused Arrow's FixedSizeList to be wrong, so I feel we might as well be explicit to be safe.

Copy link
Contributor

@gatesn gatesn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok fine, let's keep new(), but don't be specific in the vortex_except message, just say "failed to create vector" or similar, the backtrace from the result will contain the actual message.

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
@connortsui20 connortsui20 enabled auto-merge (squash) October 28, 2025 17:19
@connortsui20 connortsui20 merged commit d4bab58 into develop Oct 28, 2025
39 checks passed
@connortsui20 connortsui20 deleted the ct/struct-vector branch October 28, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Release label indicating a new feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants