Skip to content

Commit

Permalink
[BUG] bugfix for empty partitions when writing out empty partitions (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
samster25 authored Jan 23, 2024
1 parent 966145b commit 854037e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion daft/table/table_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,11 @@ def file_visitor(written_file, i=i):
**kwargs,
)

data_dict: dict[str, Any] = {schema.column_names()[0]: visited_paths}
data_dict: dict[str, Any] = {
schema.column_names()[0]: Series.from_pylist(visited_paths, name=schema.column_names()[0]).cast(
DataType.string()
)
}

if partition_values is not None:
partition_idx_series = Series.from_pylist(partition_idx).cast(DataType.int64())
Expand Down

0 comments on commit 854037e

Please sign in to comment.