Skip to content

ScalarValue::Array#6717

Draft
connortsui20 wants to merge 2 commits intodevelopfrom
ct/sv-array
Draft

ScalarValue::Array#6717
connortsui20 wants to merge 2 commits intodevelopfrom
ct/sv-array

Conversation

@connortsui20
Copy link
Contributor

@connortsui20 connortsui20 commented Feb 27, 2026

Summary

Adds an Array variant to ScalarValue that holds an ArrayRef.

This also requires passing a VortexSession in a lot more places (this is why we needed to do #6751, #6759, and #6761).

API Changes

TODO

Testing

TODO

A lot of things have to be updated still...

@connortsui20 connortsui20 requested a review from gatesn February 27, 2026 22:16
@connortsui20 connortsui20 added do not merge Pull requests that are not intended to merge changelog/break A breaking API change labels Feb 27, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 27, 2026

Merging this PR will not alter performance

✅ 954 untouched benchmarks
⏩ 1466 skipped benchmarks1


Comparing ct/sv-array (b1a66d3) with develop (07d186e)

Open in CodSpeed

Footnotes

  1. 1466 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.

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
@connortsui20 connortsui20 changed the title [DO NOT MERGE] Experimental array scalar value ScalarValue::Array Mar 2, 2026
@connortsui20 connortsui20 removed the do not merge Pull requests that are not intended to merge label Mar 2, 2026
@connortsui20 connortsui20 marked this pull request as draft March 2, 2026 22:34
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
/// require passing the length of the array to deserialize with [`ArrayParts::decode()`], we
/// store the array length in the first 8 bytes.
///
/// [`Array::serialize()`]: crate::Array::serialize
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't do this!


// TODO(connor): There is probably performance that is left on the table here.

impl TryFrom<&[u8]> for ArrayParts {
Copy link
Contributor

Choose a reason for hiding this comment

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

Delete this

let parts = ArrayParts::try_from(&bytes[8..])?;

// Deserialize the entire array.
let ctx = ArrayContext::empty();
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't work. The ArrayContext needs to be the same one that was used at write-time since it contains a mapping of u16 -> EncodingId.

I think we're better off using the IPC crate which already adds a header for framing that includes the context + the length

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can't depend on vortex-ipc since it already has a dependency on vortex-array. I can mimic it in a similar way though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/break A breaking API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants