Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Create file when writing dataframe with no rows #2540

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

kevinzwang
Copy link
Member

@kevinzwang kevinzwang commented Jul 19, 2024

Closes: #2373

@kevinzwang kevinzwang requested a review from jaychia July 19, 2024 01:34
@github-actions github-actions bot added the enhancement New feature or request label Jul 19, 2024
table = pa.Table.from_pylist([], schema=schema.to_pyarrow_schema())

[resolved_path], fs = _resolve_paths_and_filesystem(path, io_config=io_config)
basename_template = _generate_basename_template("parquet" if file_format == FileFormat.Parquet else "csv")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a method on FileFormat?

daft/dataframe/dataframe.py Show resolved Hide resolved
@kevinzwang kevinzwang enabled auto-merge (squash) July 24, 2024 18:36
@kevinzwang kevinzwang merged commit f740880 into main Jul 24, 2024
44 checks passed
@kevinzwang kevinzwang deleted the kevin/write-empty branch July 24, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write schema for empty parquet files
2 participants