Skip to content

Commit

Permalink
fix: Don't encode IPC record batch twice (#21525)
Browse files Browse the repository at this point in the history
  • Loading branch information
coastalwhite authored Feb 28, 2025
1 parent 69612d4 commit 09fa2ee
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/polars-arrow/src/io/ipc/write/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use polars_error::{polars_bail, PolarsResult};
use super::super::{IpcField, ARROW_MAGIC_V2};
use super::common::{DictionaryTracker, EncodedData, WriteOptions};
use super::common_sync::{write_continuation, write_message};
use super::{default_ipc_fields, encode_record_batch, schema, schema_to_bytes};
use super::{default_ipc_fields, schema, schema_to_bytes};
use crate::array::Array;
use crate::datatypes::*;
use crate::io::ipc::write::common::encode_chunk_amortized;
Expand Down Expand Up @@ -159,7 +159,6 @@ impl<W: Write> FileWriter<W> {
&self.options,
&mut self.encoded_message,
)?;
encode_record_batch(chunk, &self.options, &mut self.encoded_message);

let encoded_message = std::mem::take(&mut self.encoded_message);
self.write_encoded(&encoded_dictionaries[..], &encoded_message)?;
Expand Down

0 comments on commit 09fa2ee

Please sign in to comment.