Skip to content

Commit

Permalink
fix_stable: .rewind is 'unstable'
Browse files Browse the repository at this point in the history
  • Loading branch information
Igosuki committed Aug 22, 2021
1 parent 16e392f commit 5272263
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datafusion/src/avro_to_arrow/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::avro_to_arrow::arrow_array_reader::AvroArrowArrayReader;
use crate::error::Result;
use arrow::error::Result as ArrowResult;
use avro_rs::Reader as AvroReader;
use std::io::{Read, Seek};
use std::io::{Read, Seek, SeekFrom};
use std::sync::Arc;

/// Avro file reader builder
Expand Down Expand Up @@ -97,7 +97,7 @@ impl ReaderBuilder {
Some(schema) => schema,
None => Arc::new(infer_avro_schema_from_reader(&mut source)?),
};
source.rewind()?;
source.seek(SeekFrom::Start(0))?;
Reader::try_new(source, schema, self.batch_size, self.projection)
}
}
Expand Down

0 comments on commit 5272263

Please sign in to comment.