Repository navigation
Validate extension storage and return scalar read errors - #11014
Merged
Merged
Conversation
Merging this PR will degrade performance by 15.32%1 warning
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing |
connortsui20
marked this pull request as draft
October 29, 2026 22:22
connortsui20
force-pushed
the
ct/ext-types/scalar-validation
branch
2 times, most recently
from
October 30, 2026 13:46
482b0ba to
cb940e8
Compare
connortsui20
added a commit
to gitRasheed/vortex
that referenced
this pull request
Oct 30, 2026
Signed-off-by: Connor Tsui <[email protected]>
Member
Author
|
Pretty sure the microbenchmarks arent real |
connortsui20
marked this pull request as ready for review
October 30, 2026 21:10
connortsui20
commented
Oct 30, 2026
Comment on lines
+260
to
+267
| /// Creates an extension scalar after checking its storage dtype and value. | ||
| /// | ||
| /// # Errors | ||
| /// | ||
| /// Returns an error if the storage dtype differs from the extension's storage dtype, or if | ||
| /// the extension rejects the storage value. A null storage scalar requires a nullable dtype. | ||
| pub fn try_extension_ref(ext_dtype: ExtDTypeRef, storage_scalar: Scalar) -> VortexResult<Self> { | ||
| vortex_ensure_eq!(ext_dtype.storage_dtype(), storage_scalar.dtype()); |
Member
Author
There was a problem hiding this comment.
this is the main change
robert3005
reviewed
Nov 2, 2026
robert3005
approved these changes
Nov 2, 2026
Signed-off-by: Connor Tsui <[email protected]>
Move legacy F16 normalization behind the compatibility check so canonical values avoid the conversion branch. Signed-off-by: Connor Tsui <[email protected]>
Signed-off-by: Connor Tsui <[email protected]>
Signed-off-by: Connor Tsui <[email protected]>
connortsui20
force-pushed
the
ct/ext-types/scalar-validation
branch
from
November 2, 2026 13:53
cd5acd2 to
8b472f2
Compare
Signed-off-by: Connor Tsui <[email protected]>
connortsui20
force-pushed
the
ct/ext-types/scalar-validation
branch
from
November 2, 2026 14:13
9db78cb to
20036cf
Compare
Signed-off-by: Connor Tsui <[email protected]>
connortsui20
enabled auto-merge (squash)
November 2, 2026 16:28
9 tasks done
connortsui20
added a commit
that referenced
this pull request
Nov 2, 2026
U2, U3, U4, U6, U7 and U8 merged on 2026-11-02 in #11012, #11014 and #11016, and the DataFusion literal fix #11067 merged right after U2. So order constraint 1 holds, and phase 1 starts from develop. The graph shows these nodes as merged, and parts 2 and 4 name the PR that fixed each finding. #10953 now keeps i32 days and widens only the days part to i64 when a value does not fit. It has no review, and it conflicts with the DateTimeParts compare kernel that U2 changed. #11056 still waits on its request for changes. #10661 replaces the closed #10482 for file sort statistics. In the type roadmap, only the N1 sentence changes. Signed-off-by: Connor Tsui <[email protected]>
12 of 49 tasks
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
Extension validators assume that values already match their storage dtype, but scalar construction did not check that assumption. A wrong value representation could reach a validator and panic. Extension arrays also defer value validation until a scalar is read, so row reads and aggregate results need to return validation errors to the caller.
Changes
Validates the storage representation before calling the extension validator and uses fallible construction for reads, constant folding, and aggregate results. Constant folding declines invalid values so raw storage access and slicing still work. Legacy F16 bits are normalized at construction to keep the in-memory representation consistent.
Regression tests cover these boundaries, including cached NaN statistics and rejected zero values. Checks for the style cleanup are left to CI.
API Changes
Adds
Scalar::try_extension_reffor callers that need to handle invalid storage.Scalar::zero_valuekeeps its documented panic when the dtype has no valid non-null zero.