Skip to content

Commit

Permalink
fix: Optimize decimal creation macros
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuyukitanimura committed Aug 2, 2024
1 parent 3de8c8a commit 0bef641
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions native/core/src/parquet/read/values.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ macro_rules! make_int_variant_dict_impl {
make_int_variant_dict_impl!(Int16ToDoubleType, i16, f64);
make_int_variant_dict_impl!(Int32To64Type, i32, i64);
make_int_variant_dict_impl!(Int32ToDecimal64Type, i32, i64);
make_int_variant_dict_impl!(Int32DecimalType, i128, i128);
make_int_variant_dict_impl!(Int32ToDoubleType, i32, f64);
make_int_variant_dict_impl!(Int32TimestampMicrosType, i32, i64);
make_int_variant_dict_impl!(FloatToDoubleType, f32, f64);
make_int_variant_dict_impl!(Int32DecimalType, i128, i128);
make_int_variant_dict_impl!(Int64DecimalType, i128, i128);
make_int_variant_dict_impl!(UInt64Type, u128, u128);
make_int_variant_dict_impl!(FloatToDoubleType, f32, f64);

impl PlainDecoding for Int32DateType {
fn decode(src: &mut PlainDecoderInner, dst: &mut ParquetMutableVector, num: usize) {
Expand Down Expand Up @@ -808,7 +808,7 @@ macro_rules! make_plain_decimal_int_impl {
impl PlainDictDecoding for $ty {
#[inline]
fn decode_dict_one(_: usize, val_idx: usize, src: &ParquetMutableVector, dst: &mut ParquetMutableVector, _: usize) {
let num_bytes = std::mem::size_of::<d$dst_type>()
let num_bytes = std::mem::size_of::<$dst_type>()
bit::memcpy(
&src.value_buffer[val_idx * num_bytes..(val_idx + 1) * num_bytes],
&mut dst.value_buffer[dst.num_values * num_bytes..],
Expand Down

0 comments on commit 0bef641

Please sign in to comment.