-
Notifications
You must be signed in to change notification settings - Fork 76
feat: add FileWriter base interface for data file writers #446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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
|
|
||
| add_iceberg_test(roaring_test SOURCES roaring_test.cc) | ||
|
|
||
| add_iceberg_test(data_writer_test SOURCES data_writer_test.cc) |
There was a problem hiding this comment.
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.
| namespace iceberg { | ||
|
|
||
| // Mock implementation of FileWriter for testing | ||
| class MockFileWriter : public FileWriter { |
There was a problem hiding this comment.
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.
| /// | ||
| /// \note This interface uses PascalCase method naming (Write, Length, Close, Metadata) | ||
| /// to distinguish it from the lower-level iceberg/file_writer.h::Writer interface which | ||
| /// uses lowercase naming. FileWriter is the Iceberg-specific data file writer | ||
| /// abstraction, while Writer is the file format-level abstraction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// | |
| /// \note This interface uses PascalCase method naming (Write, Length, Close, Metadata) | |
| /// to distinguish it from the lower-level iceberg/file_writer.h::Writer interface which | |
| /// uses lowercase naming. FileWriter is the Iceberg-specific data file writer | |
| /// abstraction, while Writer is the file format-level abstraction. |
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.