Skip to content

Commit

Permalink
feat(format): replace state each deserialize
Browse files Browse the repository at this point in the history
  • Loading branch information
zhang2014 committed May 7, 2022
1 parent 036df85 commit 4f9a2e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions query/src/formats/format_csv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ impl InputFormat for CsvInputFormat {
deserializers.push(data_type.create_deserializer(self.min_accepted_rows));
}

let mut state = std::mem::replace(state, self.create_state());
let state = state.as_any().downcast_mut::<CsvInputState>().unwrap();
let cursor = Cursor::new(&state.memory);
let reader: Box<dyn BufferRead> = Box::new(BufferReader::new(cursor));
Expand Down

0 comments on commit 4f9a2e9

Please sign in to comment.