-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUG] Writes from empty partitions should return empty micropartition…
…s with non-null schema (#2952) If one partition is empty the write will return a list of file paths / partition cols but the data type is NULL. This is problematic because it will cause schema mismatch with other partitions that did have writes. ``` import daft df = ( daft.from_pydict({"foo": [1, 2, 3], "bar": ["a", "b", "c"]}) .into_partitions(4) .write_parquet("z", partition_cols=["bar"]) ) print(df) daft.exceptions.DaftCoreException: DaftError::SchemaMismatch MicroPartition concat requires all schemas to match, ╭─────────────┬──────╮ │ Column Name ┆ Type │ ╞═════════════╪══════╡ │ path ┆ Utf8 │ ├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌┤ │ bar ┆ Utf8 │ ╰─────────────┴──────╯ vs ╭─────────────┬──────╮ │ Column Name ┆ Type │ ╞═════════════╪══════╡ │ path ┆ Null │ ╰─────────────┴──────╯ ``` --------- Co-authored-by: Colin Ho <[email protected]>
- Loading branch information
Showing
5 changed files
with
98 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters