From 3b727323614c4b941a7bed97badcb28481583240 Mon Sep 17 00:00:00 2001 From: Jay Chia Date: Tue, 3 Sep 2024 14:37:58 -0700 Subject: [PATCH] Explicitly pass in pyarrow schema during table construction --- daft/dataframe/dataframe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daft/dataframe/dataframe.py b/daft/dataframe/dataframe.py index 596e55b013..c0445fdaac 100644 --- a/daft/dataframe/dataframe.py +++ b/daft/dataframe/dataframe.py @@ -2515,7 +2515,7 @@ def to_arrow(self) -> "pyarrow.Table": import pyarrow as pa arrow_rb_iter = self.to_arrow_iter(results_buffer_size=None) - return pa.Table.from_batches(arrow_rb_iter) + return pa.Table.from_batches(arrow_rb_iter, schema=self.schema().to_pyarrow_schema()) @DataframePublicAPI def to_pydict(self) -> Dict[str, List[Any]]: