-
Notifications
You must be signed in to change notification settings - Fork 13
Implement JsonSerde for all datatypes #53
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
Implement JsonSerde for all datatypes #53
Conversation
e059a0e to
219c595
Compare
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.
Pull request overview
This PR implements JSON serialization and deserialization for all DataType variants in the Fluss metadata system, completing issue #39. It adds support for complex types (Decimal, Time, Timestamp variants, Array, Map, Row) that were previously marked with todo!() placeholders.
Key changes:
- Fixed typo in constant name (FILED_NAME_SCALE → FIELD_NAME_SCALE)
- Implemented JsonSerde for all DataType variants including nested/complex types
- Implemented JsonSerde for DataField to support Row type serialization
- Improved error message consistency ("should be" → "must be")
- Added comprehensive test coverage for all data types
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@pavlospt fluss doesn't support yet Array, Map types. it's on the roadmap for the next release 0.9.0 |
Although fluss doesn't support it yet, we can define them in spec just like what we do in fluss-java, where we define |
luoyuxia
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.
@pavlospt Thanks for the pr. Left minor comments.
376c459 to
b5f37f9
Compare
|
@pavlospt Hi, ci fails |
It needs to go through manual approval to run the CI every time so I will fix it now :D |
- Fix typo in FIELD_NAME_SCALE constant - Implement JsonSerde for DataField - Complete serialize_json and deserialize_json for all DataType variants - Add comprehensive test for DataType json serialization/deserialization Resolves issue apache#39 Amp-Thread-ID: https://ampcode.com/threads/T-12d3046f-c788-4b3e-b1ae-6830b05aa926 Co-authored-by: Amp <[email protected]> Update crates/fluss/src/metadata/json_serde.rs Co-authored-by: Copilot <[email protected]> Update crates/fluss/src/metadata/json_serde.rs Co-authored-by: Copilot <[email protected]> Update crates/fluss/src/metadata/json_serde.rs Co-authored-by: Copilot <[email protected]> Update crates/fluss/src/metadata/json_serde.rs Co-authored-by: Copilot <[email protected]>
b5f37f9 to
49d0fad
Compare
luoyuxia
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.
@pavlospt Thank you very much. LGTM
Resolves issue #39: Implement JsonSerde for all datatypes
This PR completes the implementation of JsonSerde for all DataType variants, including complex types like Decimal, Time, Timestamp, TimestampLTz, Array, Map, and Row.
Changes include:
All tests pass.
Fixes #39