-
Notifications
You must be signed in to change notification settings - Fork 705
feat: impl ToStreamProst for stream exchange
#967
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
rust/common/src/catalog/schema.rs
Outdated
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'd prefer to return Result here.
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.
It's Ok. The problem is to_stream_prost_body is not return a Result. So there must a unwrap remain.
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 think we should refactor it to return a Result. I'll take this later. We can unwrap for now.
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.
Why? I think to_prost must succeed.
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.
EncodeError always indicates that a message failed to encode because the provided buffer had insufficient capacity. Message encoding is otherwise infallible.
You're right. It must succeed in our cases.
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.
But it's been changed to Result<Vec<ProstField>>😇
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.
unreachable?
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.
Actually not unreachable, if it is Any or AnyShard, it will panic in above match arms. If it's Single/Broadcast, return a zero vector is expected.
Codecov Report
@@ Coverage Diff @@
## main #967 +/- ##
============================================
- Coverage 71.73% 71.69% -0.05%
Complexity 2766 2766
============================================
Files 971 972 +1
Lines 56825 56938 +113
Branches 1787 1787
============================================
+ Hits 40766 40820 +54
- Misses 15169 15228 +59
Partials 890 890
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
4655b13 to
0ae973b
Compare
What's changed and what's your intention?
Part of #967
Checklist
Refer to a related PR or issue link (optional)