-
Notifications
You must be signed in to change notification settings - Fork 70
feat: add json serde for table metadata #75
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
6acbdc6 to
2d55ea2
Compare
| } | ||
| }; | ||
|
|
||
| /// \brief Returns a string representation of a BlobMetadata |
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.
The method name may need to use BlobMetadataToString to avoid conflicts with the ToString method in member methods ?
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 have removed ToString member function because inheritance prohibits aggregate initialization.
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.
SGTM. We could extend the std::format specialization to look for an overload of iceberg::ToString or something (or try argument-dependent lookup? 🤔)
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.
Yes, I think we can specialize std::formatter in the iceberg/util/formatter.h for classes that have iceberg::ToString(const T&) at hands.
| } | ||
| }; | ||
|
|
||
| /// \brief Returns a string representation of a BlobMetadata |
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.
SGTM. We could extend the std::format specialization to look for an overload of iceberg::ToString or something (or try argument-dependent lookup? 🤔)
zhjwpku
left a comment
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.
LGTM
2d55ea2 to
1f4447a
Compare
1f4447a to
45514cf
Compare
gty404
left a comment
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.
LGTM
Fokko
left a comment
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.
@wgtmac Thanks for raising this PR, this looks great already! How do you feel about adding some tests?
We have some example JSONs here: https://github.com/apache/iceberg/tree/main/core/src/test/resources
Fokko
left a comment
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.
@wgtmac Sounds good to me 👍 Thanks for working on this, this looks great!
No description provided.