Skip to content

Commit 8c63f4d

Browse files
committed
always write using correct schema for the file
1 parent 9297732 commit 8c63f4d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

meshtastic/slog/arrow.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ def _write(self):
4646
# only need to look at the first row to learn the schema
4747
self.set_schema(pa.Table.from_pylist([self.new_rows[0]]).schema)
4848

49-
self.writer.write_batch(pa.RecordBatch.from_pylist(self.new_rows))
49+
self.writer.write_batch(
50+
pa.RecordBatch.from_pylist(self.new_rows, schema=self.schema)
51+
)
5052
self.new_rows = []
5153

5254
def add_row(self, row_dict: dict):

0 commit comments

Comments
 (0)