Skip to content

Conversation

@shangxinli
Copy link
Contributor

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 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

add_iceberg_test(roaring_test SOURCES roaring_test.cc)

add_iceberg_test(data_writer_test SOURCES data_writer_test.cc)
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to move it to the if(ICEBERG_BUILD_BUNDLE) block below since it depends on Avro and Parquet libraries.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

namespace iceberg {

// Mock implementation of FileWriter for testing
class MockFileWriter : public FileWriter {
Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure

@shangxinli shangxinli force-pushed the data_file_writers branch 2 times, most recently from df57c5a to 5cae029 Compare December 29, 2025 17:47
shangxinli and others added 3 commits December 29, 2025 10:06
The test depends on Avro and Parquet libraries, so it should be
built within the ICEBERG_BUILD_BUNDLE conditional block.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants