-
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
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
src/iceberg/test/CMakeLists.txt
Outdated
|
|
||
| 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.
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.
sure
| 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.
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.
Sure
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.
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.