Core: Prevent empty Puffin file creation in DV writer#13666
Merged
Conversation
Contributor
There was a problem hiding this comment.
Thanks @geruh for the fix! Just had a minor comment and could we also add a small test to TestDVWriters to sanity check that the result returned for this particular case has empty contents for the DVs, referenced data files, and rewritten deletes. I think we can additionally check the file system to make sure we're not creating additional files (e.g. list the table data location and make sure there's no puffin files)
ebyhr
reviewed
Jul 25, 2025
ebyhr
left a comment
Member
There was a problem hiding this comment.
Can we add a test to TestDVWriters or somewhere?
nastra
reviewed
Jul 25, 2025
nastra
reviewed
Jul 25, 2025
ebyhr
reviewed
Jul 25, 2025
amogh-jahagirdar
approved these changes
Jul 25, 2025
Contributor
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
BaseDVFileWriterwas creating Puffin files in itsclose()method, even when no delete operations were performed. Resulting in empty orphaned Puffin files being created andDeleteWriteResultis empty.It seems by design that the puffin writer always creates an output stream even if no rows are written.
Repro steps
Create MOR V3 Table with and insert some rows i.e.
INSERT INTO test_table VALUES (10, 'a'), (20, 'b'), (30, 'c');Delete from table where a positional scan is not null but no rows match i.e.
DELETE FROM test_table WHERE id = 25;Observe empty puffin files in data directory not referenced by any manifest.