We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6afc7c7 commit 741f907Copy full SHA for 741f907
encodings/zstd/src/compute/cast.rs
@@ -10,9 +10,9 @@ use crate::{ZstdArray, ZstdVTable};
10
11
impl CastKernel for ZstdVTable {
12
fn cast(&self, array: &ZstdArray, dtype: &DType) -> VortexResult<Option<ArrayRef>> {
13
- if !dtype.is_nullable() || !array.all_valid() {
14
- // We cannot cast to non-nullable since the validity containing nulls is used to decode
15
- // the ZSTD array, this would require rewriting tables.
+ if !dtype.is_nullable() && !array.all_valid() {
+ // If there are nulls, then the cast is not trivial and requires decoding
+ // to rewrite the tables.
16
return Ok(None);
17
}
18
// ZstdArray is a general-purpose compression encoding using Zstandard compression.
0 commit comments