feat: add FileWriter base interface for data file writers#446
Merged
wgtmac merged 7 commits intoapache:mainfrom Dec 30, 2025
Merged
feat: add FileWriter base interface for data file writers#446wgtmac merged 7 commits intoapache:mainfrom
wgtmac merged 7 commits intoapache:mainfrom
Conversation
Add iceberg/data subdirectory with FileWriter base interface that defines common operations for writing Iceberg data files, including data files, equality delete files, and position delete files. - Add FileWriter interface with Write, Length, Close, and Metadata methods - Add WriteResult struct to hold metadata for produced files - Add comprehensive unit tests with MockFileWriter implementation - Update build system to include new data subdirectory Related to apache#441 task 1
- Use default member initializers in MockFileWriter - Fix include ordering per clang-format - Fix line wrapping in comments and assertions
wgtmac
reviewed
Dec 29, 2025
|
|
||
| add_iceberg_test(roaring_test SOURCES roaring_test.cc) | ||
|
|
||
| add_iceberg_test(data_writer_test SOURCES data_writer_test.cc) |
Member
There was a problem hiding this comment.
I think we need to move it to the if(ICEBERG_BUILD_BUNDLE) block below since it depends on Avro and Parquet libraries.
| namespace iceberg { | ||
|
|
||
| // Mock implementation of FileWriter for testing | ||
| class MockFileWriter : public FileWriter { |
Member
There was a problem hiding this comment.
IMHO, we don't need to add test cases for a pure interface classes. We can keep it for now and then remove all these cases once we have implemented DataWriter.
df57c5a to
5cae029
Compare
Co-authored-by: Gang Wu <ustcwg@gmail.com>
The test depends on Avro and Parquet libraries, so it should be built within the ICEBERG_BUILD_BUNDLE conditional block.
wgtmac
approved these changes
Dec 30, 2025
wgtmac
reviewed
Dec 30, 2025
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.
Add iceberg/data subdirectory with FileWriter base interface that defines common operations for writing Iceberg data files, including data files, equality delete files, and position delete files.