forked from delta-io/delta-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not write empty parquet file/add on writer close; accurately … (
delta-io#2123) …track unflushed row group size # Description When writing a batch with the writer, if that batch would result in a flush and no more batches follow, then on close an empty parquet file (no rows) is written. This includes an Add in the log that looks like ``` Add { path: "part-00002-3da49db6-e5e9-4426-8839-0092a56cc155-c000.parquet", partition_values: {}, size: 346, modification_time: 1706297596165, data_change: true, stats: Some( "{\"numRecords\":0,\"minValues\":{},\"maxValues\":{},\"nullCount\":{}}", ), tags: None, deletion_vector: None, base_row_id: None, default_row_commit_version: None, clustering_provider: None, stats_parsed: None, }, ``` The empty stats structs causes issues with scans in datafusion. Also changed it so the writer tracking internal buffers includes the parquet writer buffering within its row group writer.
- Loading branch information
1 parent
7fdb33b
commit c9ee664
Showing
1 changed file
with
66 additions
and
6 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