-
Notifications
You must be signed in to change notification settings - Fork 119
feat: support union type for basic types #510
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
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks for your patience! Very close!
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.
Note that TypedValue
in this file also needs to be updated. for UnionType
, we should only serialize the value part, without the tag.
I just spared some time to check the changes. Looks like everything has been addressed for now. But it needs thorough testing. |
That's great, thanks! I just added a testutil cocoindex/python/cocoindex/tests/test_convert.py Lines 67 to 69 in 48a0331
It can be used to in test to cover multiple encode/decode/serialize/deserialize functions on both Rust and Python side. Would you try to add a few tests for union types with this and see if it passes? |
Sorry for the late reply. I was sick these days and couldn't think or code. I will check the change and add test cases, and try not to delay this PR any further. |
@chardoncs I'm sorry to hear you're sick. No worries, take your time and have enough rest! Hope you'll be better soon. |
Here is my solution on the union type support. It includes basic conversions and representations for the union type.
If there are any problems with the change, feel free to speak out for revision or reject.
Context
This PR is an attempt to solve Issue #436. It includes descriptions and conceptual works about union type support.