Skip to content
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

feat: add handwritten serialize #185

Merged
merged 3 commits into from
Feb 5, 2024
Merged

Conversation

odysa
Copy link
Contributor

@odysa odysa commented Feb 3, 2024

Add serialize for TableMetadata and use TryFrom as discussed in #177

Copy link
Collaborator

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@liurenjie1024
Copy link
Collaborator

cc @ZENOTME @Xuanwo @Fokko PTAL

TableMetadataV1 {
impl TryFrom<TableMetadata> for TableMetadataV1 {
type Error = Error;
fn try_from(v: TableMetadata) -> Result<Self, Error> {
Copy link
Contributor

Choose a reason for hiding this comment

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

If we still use expect at following, why we need to convert it to try_from🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, cuz I want make 2 separate PRs -- 1 for serialize and 1 for removing expect . I should really mention it before.

@odysa
Copy link
Contributor Author

odysa commented Feb 4, 2024

Replaced expect with ok_or in this PR as suggested. cc @liurenjie1024 @ZENOTME

Copy link
Collaborator

@liurenjie1024 liurenjie1024 left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

Thanks @odysa for raising this PR, and thanks @liurenjie1024 for the prompt review 🙌

@Fokko Fokko merged commit 6929b79 into apache:main Feb 5, 2024
7 checks passed
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.

None yet

4 participants