Skip to content

Conversation

@connortsui20
Copy link
Contributor

@connortsui20 connortsui20 commented Dec 11, 2025

Adds append_array_as_list methods to the list arrays.

This makes it possible to circumvent having to use ListScalars to build ListArrays (or any of the other list array kinds).

cc @nrc Let me know if this helps your usecase!

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
@codecov
Copy link

codecov bot commented Dec 11, 2025

Codecov Report

❌ Patch coverage is 96.47887% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.39%. Comparing base (346b1f6) to head (c34a3f2).
⚠️ Report is 8 commits behind head on develop.

Files with missing lines Patch % Lines
vortex-array/src/builders/fixed_size_list.rs 96.22% 2 Missing ⚠️
vortex-array/src/builders/listview.rs 95.91% 2 Missing ⚠️
vortex-array/src/builders/list.rs 97.50% 1 Missing ⚠️

☔ 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.

@nrc
Copy link
Contributor

nrc commented Dec 12, 2025

This seems to do exactly what I want, thanks!

///
/// Note that the list entry will be non-null but the elements themselves are allowed to be null
/// (only if the elements [`DType`] is nullable, of course).
pub fn append_array_as_list(&mut self, array: &dyn Array) -> VortexResult<()> {
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a reason this returns a Result? It doesn't look like you ever return an err back

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the vortex_ensure returns an error. Maybe that needs to be renamed...

Copy link
Contributor

Choose a reason for hiding this comment

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

this is a weird mix of err and panics, i'm wondering if the overflow check should also be an error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe, though I usually associate overflow with panic so I thought it is fine. We would have to change other things in this file as well then

@connortsui20 connortsui20 merged commit bf4e84e into develop Dec 12, 2025
56 of 57 checks passed
@connortsui20 connortsui20 deleted the ct/append_array_as_list branch December 12, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants