Skip to content

Conversation

@wypoon
Copy link
Contributor

@wypoon wypoon commented Sep 21, 2023

Variant of #6799 except that new newAppender method added to ManifestWriter is declared abstract.
This means that it is a breaking API change.

sumeetgajjar and others added 11 commits September 20, 2023 14:46
1. remove unecessary edits to use compression codec and
   compression level from tests
2. move ManifestWriter tests to TestManifestWriter
3. move ManifestListWriter tests to TestManifestListWriter
4. remove unwanted `ManifestLists#write` method
Remove NumberUtil. Use PropertyUtil.propertyAsNullableInt instead.
Add convenience method propertyAsNullableInt to TableMetadata.
Fix a TestTableBase#writeManifest to write a file with .avro extension.
Revert Flink 1.15 changes and make them in Flink 1.16 instead.
Retain but deprecate old newAppender method in ManifestWriter.
Make Codec public in Avro, we can can use the enum values.
Rename CODEC_METADATA_MAPPING to AVRO_CODEC_NAME_MAPPING in TableTestBase
and provide explanatory comment. Use named constants in the map.
Adopt suggestion to use AssertJ assertions in test verification.
Update zstd-jni version.
Make zstd-jni dependency testRuntimeOnly.
Fix some nits.
Simplify validate methods in TestManifestWriter and TestManifestListWriter.
@wypoon
Copy link
Contributor Author

wypoon commented Sep 21, 2023

@nastra @ConeyLiu this is the same as the latest in #6799 plus one more commit, to make the new newAppender method in ManifestWriter abstract.
We can break the API now or later. It might be better to break it now.

- code: "java.class.removed"
old: "interface org.apache.iceberg.actions.RewritePositionDeleteStrategy"
justification: "Removing deprecated code"
- code: "java.method.abstractMethodAdded"
Copy link
Contributor

Choose a reason for hiding this comment

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

we shouldn't be breaking the API. See also my comment in #6799 (comment) on how to avoid breaking the API for adding the new method

Copy link
Contributor Author

@wypoon wypoon Sep 22, 2023

Choose a reason for hiding this comment

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

Yes, your suggestion was followed in #6799 and I haven't reverted it there.
I think @ConeyLiu's point is that the new newAppender method doesn't break the API because it is not abstract -- it calls the old newAppender. However, the old newAppender is deprecated and when it is removed, the new newAppender then has to be changed. There is no natural implementation for it, so it should be abstract. Of course, one could do something else, such as return null or throw an UnsupportedOperationException.
If anyone out there actually writes their own ManifestWriter subclass, they would need to implement a newAppender(PartitionSpec, OutputFile, String, Integer) method. We avoid breaking the API now, which allows them to get away without implementing the new method, but when newAppender(PartitionSpec, OutputFile) is then removed, that will break them (even if we do not technically break the API by keeping newAppender(PartitionSpec, OutputFile, String, Integer) non-abstract and throwing an UnsupportedOperationException -- it effectively breaks them).

@github-actions
Copy link

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Sep 20, 2024
@github-actions
Copy link

This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

@github-actions github-actions bot closed this Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants