mirror of
https://github.com/meshtastic/python.git
synced 2026-01-04 22:08:00 -05:00
always write using correct schema for the file
This commit is contained in:
@@ -46,7 +46,9 @@ class ArrowWriter:
|
||||
# only need to look at the first row to learn the schema
|
||||
self.set_schema(pa.Table.from_pylist([self.new_rows[0]]).schema)
|
||||
|
||||
self.writer.write_batch(pa.RecordBatch.from_pylist(self.new_rows))
|
||||
self.writer.write_batch(
|
||||
pa.RecordBatch.from_pylist(self.new_rows, schema=self.schema)
|
||||
)
|
||||
self.new_rows = []
|
||||
|
||||
def add_row(self, row_dict: dict):
|
||||
|
||||
Reference in New Issue
Block a user