Skip to content

fix[sparse]: correctly handle cast for all-patched#6979

Merged
joseph-isaacs merged 1 commit intodevelopfrom
ji/fix-fuzz-6932
Mar 16, 2026
Merged

fix[sparse]: correctly handle cast for all-patched#6979
joseph-isaacs merged 1 commit intodevelopfrom
ji/fix-fuzz-6932

Conversation

@joseph-isaacs
Copy link
Contributor

Fixes #6932

Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
@joseph-isaacs joseph-isaacs enabled auto-merge (squash) March 16, 2026 12:22
let casted_fill = if array.patches().num_patches() == array.len() {
// When every position is patched the fill is unused — skip casting it
// entirely and substitute a zero value for the target dtype.
Scalar::zero_value(dtype)
Copy link
Contributor

@connortsui20 connortsui20 Mar 16, 2026

Choose a reason for hiding this comment

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

Shouldn't this be the default value? Since it should be null if the array is nullable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is undef (could be any value).

We really should never have this array. But the current executor cannot ensure that a reduce (on sparse runs before this).

Copy link
Contributor

Choose a reason for hiding this comment

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

In that case just make it default so it can fast path a null scalar here

@joseph-isaacs joseph-isaacs added the changelog/fix A bug fix label Mar 16, 2026
@connortsui20 connortsui20 disabled auto-merge March 16, 2026 12:45
@joseph-isaacs joseph-isaacs merged commit 01669a0 into develop Mar 16, 2026
61 of 62 checks passed
@joseph-isaacs joseph-isaacs deleted the ji/fix-fuzz-6932 branch March 16, 2026 12:57
@connortsui20 connortsui20 mentioned this pull request Mar 16, 2026
connortsui20 added a commit that referenced this pull request Mar 16, 2026
## Summary

Followup to #6979

We should use the default value here to fast path the null, and also the
comment was incorrect since casting can always fail.

## Testing

N/A

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fuzzing Crash: VortexError in array_ops

2 participants