Skip to content

Commit c485e7d

Browse files
committed
fix: row_encoder merge error
1 parent 58bb7f2 commit c485e7d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

arrow-pg/src/row_encoder.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,18 @@ impl RowEncoder {
3737
}
3838

3939
let arrow_schema = self.rb.schema_ref();
40-
let mut encoder = DataRowEncoder::new(self.fields.clone());
4140
for col in 0..self.rb.num_columns() {
4241
let array = self.rb.column(col);
4342
let arrow_field = arrow_schema.field(col);
4443
let pg_field = &self.fields[col];
4544

46-
if let Err(e) = encode_value(&mut encoder, array, self.curr_idx, arrow_field, pg_field)
47-
{
45+
if let Err(e) = encode_value(
46+
&mut self.row_encoder,
47+
array,
48+
self.curr_idx,
49+
arrow_field,
50+
pg_field,
51+
) {
4852
return Some(Err(e));
4953
};
5054
}

0 commit comments

Comments
 (0)