Skip to content

Extension Scalar VTable#6680

Merged
connortsui20 merged 10 commits intodevelopfrom
ct/ext-scalar-final
Feb 25, 2026
Merged

Extension Scalar VTable#6680
connortsui20 merged 10 commits intodevelopfrom
ct/ext-scalar-final

Conversation

@connortsui20
Copy link
Contributor

Summary

Tracking Issue: #6618

Adds methods related to extension scalars to the ExtVTable.

This then required updating existing implementors of ExtVTable (only datetime and mock extension test types).

I think this is a nice step before the much more intrusive change to ScalarValue where we add the Extension variant.

API Changes

This is a breaking change to ExtVTable.

Testing

TODO

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 requested a review from gatesn February 25, 2026 19:33
@connortsui20 connortsui20 added the changelog/break A breaking API change label Feb 25, 2026
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.

Looking nice

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

I added some TODOs and concerns, could you take a look at the most recent commit @gatesn?

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

// TODO(connor): Figure out what this should look like.
// mod plugin;
// pub use plugin::ExtScalarValuePlugin;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think in this case it's weird, we only need one Plugin for the ExtVTable, not one for DType and one for Scalar.

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 still dont actually understand what the plugin is for even after reading the doc comment

Copy link
Contributor

Choose a reason for hiding this comment

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

The "plugin" is the thing that lives on the session. It's what allows us to deserialize things into in-memory objects. We lookup the plugin by ID, then call its deserialize function.

It basically encapsulates extension dtype behavior that doesn't have an instance object to operate on.

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

So I decided to keep the validate_scalar_value, but now it just calls unpack_native.map(|_| ()). This way if we see a perf problem later it is way easier to just implement this if we want to.

@connortsui20
Copy link
Contributor Author

I am still concerned about some of the trait impls on ExtScalarValueRef, right now it basically just delegates things like Eq, Ord, and Hash to the storage value. I don't think we want this? We probably want the implementor to implement this manually right?

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

gatesn commented Feb 25, 2026

I am still concerned about some of the trait impls on ExtScalarValueRef, right now it basically just delegates things like Eq, Ord, and Hash to the storage value. I don't think we want this? We probably want the implementor to implement this manually right?

Your instinct is correct! But we can do that in the future. We should do it alongside arrays so we can define the vectorized version of this at the same time, otherwise scalar and array semantics would differ.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 25, 2026

Merging this PR will not alter performance

✅ 954 untouched benchmarks
⏩ 1466 skipped benchmarks1


Comparing ct/ext-scalar-final (6348fca) with develop (d59d334)

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 marked this pull request as ready for review February 25, 2026 21:29
@connortsui20 connortsui20 requested a review from gatesn February 25, 2026 21:31
@connortsui20 connortsui20 enabled auto-merge (squash) February 25, 2026 21:44
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
@connortsui20 connortsui20 enabled auto-merge (squash) February 25, 2026 21:55
@connortsui20 connortsui20 merged commit ea7804c into develop Feb 25, 2026
49 checks passed
@connortsui20 connortsui20 deleted the ct/ext-scalar-final branch February 25, 2026 22:01
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