Skip to content

ORC-1483: [Java] Remove obsolete FileMetadata - #1588

Closed
deshanxiao wants to merge 2 commits into
apache:mainfrom
deshanxiao:orc-1483
Closed

deshanxiao wants to merge 2 commits into
apache:mainfrom
deshanxiao:orc-1483

Conversation

@deshanxiao

@deshanxiao deshanxiao commented Aug 17, 2023 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This PR is aimed to remove obsolete FileMetadata.

Why are the changes needed?

For code optimization.

1.No class implements FileMetadata, and the constructor of ReaderImpl is extremely cumbersome.
2.FileMetadata is obsolete and doesn't support encryption. See:

// FileMetadata is obsolete and doesn't support encryption

How was this patch tested?

Exist UT

deshanxiao added 2 commits August 17, 2023 19:38
@github-actions github-actions Bot added the JAVA label Aug 17, 2023
return this;
}

public FileMetadata getFileMetadata() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shall we mark this method as deprecated in early releases and then remove in 2.0?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As @mystic-lama pointed, Apache ORC community cannot drop the public API without a deprecation, @deshanxiao .

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

+1 for @mystic-lama points. Acutally this PR targets 2.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@deshanxiao What I meant is we need one more PR with this API marked as deprecated in a version that goes out before 2.0.0, so that people can expect the change. I don't have strong opinion on this, given breaking changes are expected in major release. Please choose what is least disruptive. Once we make a decision on this, I can give my +1

A big Thank You for deleting dead code 🙇‍♂️

@dongjoon-hyun dongjoon-hyun Aug 19, 2023 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are two more comments.

  1. +1 for another independent deprecation PR for specific discussion about that.
  2. Please note that Deperecated Code is not a dead code. If there is any usage in the downstream, we may not be able to delete the deprecated code. For example, we recovered the deleted code back for downstream projects.

ORC-677: Add a deprecated legacy constructor SargApplier back (#557)
ORC-676: Add getRawDataSizeFromColIndices back to ReaderImpl (#555)
ORC-671: Add OrcTail.getStripeStatistics back for backward compatiblility (#549)

We had better be very careful even in 2.0.0. Semantic Versioning means it allows breaking changes, but doesn't mean we need to break absolutely. The fundamental purpose of Semantic Versioning is to help users.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you @dongjoon-hyun @mystic-lama . I will open an independent PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants