Skip to content

Commit

Permalink
replace deprecated function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
pacman82 committed Aug 7, 2023
1 parent b28e919 commit 37d85cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/insert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ trait InserterBuilderStart: DataType + Sized {
let mut cr = Self::get_column_reader(column_reader).expect(BUG);
let values = Self::unwrap_writer_required(column_writer);
// Do not utilize parquet buffer. just pass the values through.
cr.read_batch(num_rows, None, None, values)?;
let (_complete_rec, _num_val, _num_lvl) =
cr.read_records(num_rows, None, None, values)?;
Ok(())
},
)
Expand Down
6 changes: 4 additions & 2 deletions src/parquet_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ impl ParquetBuffer {
T::T: BufferedDataType,
{
let (values, def_levels) = T::T::mut_buf(self);
let (_num_val, _num_lvl) = cr.read_batch(batch_size, Some(def_levels), None, values)?;
let (_complete_rec, _num_val, _num_lvl) =
cr.read_records(batch_size, Some(def_levels), None, values)?;
// Strip mutability form the element of values, so we can use it in scan, there we only want
// to mutate which part of values we see, not the elements of values themselfes.
let values: &_ = values;
Expand Down Expand Up @@ -167,7 +168,8 @@ impl ParquetBuffer {
T::T: BufferedDataType,
{
let (values, _def_levels) = T::T::mut_buf(self);
let (_num_val, _num_lvl) = cr.read_batch(batch_size, None, None, values)?;
let (_complete_rec, _num_val, _num_lvl) =
cr.read_records(batch_size, None, None, values)?;
let it = values.iter();

Ok(it)
Expand Down

0 comments on commit 37d85cd

Please sign in to comment.