Skip to content

Commit

Permalink
fix: Spark-4.0 widening type support
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuyukitanimura committed Jul 12, 2024
1 parent 038a8b3 commit 87faf1f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions native/core/src/parquet/read/values.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ macro_rules! make_int_decimal_variant_impl {
impl PlainDecoding for $ty {
fn decode(src: &mut PlainDecoderInner, dst: &mut ParquetMutableVector, num: usize) {
let dst_slice = dst.value_buffer.as_slice_mut();
let dst_offset = dst.num_values * $type_width;
let dst_offset = dst.num_values * 8;
$copy_fn(&src.data[src.offset..], &mut dst_slice[dst_offset..], num);

let src_scale = src.desc.type_scale();
Expand Down Expand Up @@ -510,16 +510,16 @@ macro_rules! make_int_decimal_variant_impl {
}
}

src.offset += 4 * num;
src.offset += $type_width * num;
}

fn skip(src: &mut PlainDecoderInner, num: usize) {
src.offset += 4 * num;
src.offset += $type_width * num;
}
}
};
}
make_int_decimal_variant_impl!(Int32ToDecimal64Type, copy_i32_to_i64, 8, i64);
make_int_decimal_variant_impl!(Int32ToDecimal64Type, copy_i32_to_i64, 4, i64);
make_int_decimal_variant_impl!(Int64ToDecimal64Type, copy_i64_to_i64, 8, i64);

macro_rules! generate_cast_to_unsigned {
Expand Down

0 comments on commit 87faf1f

Please sign in to comment.