-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[native] [presto] Expand connector specific fields #25474
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
|
This pull request was exported from Phabricator. Differential Revision: D77612938 |
| void toThrift( | ||
| const std::shared_ptr< | ||
| facebook::presto::protocol::ConnectorTransactionHandle>& proto, | ||
| ConnectorTransactionHandleWrapper& thrift) {} |
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.
toThrift for connector specific structs are not implemented yet because they are not used (we only need fromThrift for these structs as they are part of TaskUpdateRequest, which coordinator sends to worker). We can take this as a follow-up task to implement.
| } else if (thrift.jsonValue().has_value()) { | ||
| json j = json::parse(thrift.jsonValue().value()); | ||
| from_json(j, proto); | ||
| } |
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.
This matches with Java coordinator changes. For connector structs, there will be 3 fields (connectorId, thriftValue, and jsonValue). When connectorId and thriftValue are supplied, we use thrift codec. When jsonValue is supplied, we use json codec.
arhimondr
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.
Looks good to me % comments
| namespace facebook::presto::protocol { | ||
| struct ConnectorSplit : public JsonEncodedSubclass { | ||
| static std::optional<std::string> serialize(ConnectorSplit& p) { | ||
| return std::nullopt; |
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.
This should throw by default. For example if a certain connector does not provide a custom serialize / deserialize methods but a coordinator sends a custom serialized field - this should throw an exception and cause a failure. Maybe throw something like VELOX_UNSUPPORTED instead of returning an Optional
| return std::nullopt; | ||
| } | ||
| static std::shared_ptr<ConnectorSplit> deserialize(const std::string& data, std::shared_ptr<ConnectorSplit> p) { | ||
| return nullptr; |
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.
same here and for ConnectorTransactionHandle as well
| 1: string metadataUpdates; | ||
| struct ConnectorSplitWrapper { | ||
| 1: optional string connectorId; | ||
| 2: optional binary thriftValue; |
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.
Should it be called thriftValue or customSerializedValue? In other words do we make an explicit assumption that a connector will serialize / deserialize with Thrift?
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.
synced with Shang to make relevant changes on Java as well
Summary: Rollback Plan: Differential Revision: D77612938
|
This pull request was exported from Phabricator. Differential Revision: D77612938 |
Summary: Pull Request resolved: prestodb#25474 Reviewed By: tanjialiang Differential Revision: D77612938
|
This pull request was exported from Phabricator. Differential Revision: D77612938 |
Summary: Pull Request resolved: prestodb#25474 Reviewed By: tanjialiang Differential Revision: D77612938
Summary: Pull Request resolved: prestodb#25474 Reviewed By: tanjialiang Differential Revision: D77612938
Summary: Pull Request resolved: prestodb#25474 Reviewed By: tanjialiang Differential Revision: D77612938
Summary: Pull Request resolved: prestodb#25474 Reviewed By: tanjialiang Differential Revision: D77612938
|
This pull request was exported from Phabricator. Differential Revision: D77612938 |
Summary: Pull Request resolved: prestodb#25474 Reviewed By: tanjialiang Differential Revision: D77612938
|
Saved that user @vhsu14 is from Meta |
## Description - Native changes to expand connector specific fields for thrift migration - Depends on prestodb#25242 ## Motivation and Context prestodb/rfcs#38 ## Test Plan Build package and test in verifier: 230498 ## Release Notes Please follow [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines) and fill in the release notes below. ``` == RELEASE NOTES == Prestissimo (Native Execution) Changes * Update thrift IDL to expand connector specific fields ```
## Description - Native changes to expand connector specific fields for thrift migration - Depends on prestodb#25242 ## Motivation and Context prestodb/rfcs#38 ## Test Plan Build package and test in verifier: 230498 ## Release Notes Please follow [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines) and fill in the release notes below. ``` == RELEASE NOTES == Prestissimo (Native Execution) Changes * Update thrift IDL to expand connector specific fields ```
## Description - Native changes to expand connector specific fields for thrift migration - Depends on prestodb#25242 ## Motivation and Context prestodb/rfcs#38 ## Test Plan Build package and test in verifier: 230498 ## Release Notes Please follow [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines) and fill in the release notes below. ``` == RELEASE NOTES == Prestissimo (Native Execution) Changes * Update thrift IDL to expand connector specific fields ```
## Description - Native changes to expand connector specific fields for thrift migration - Depends on prestodb#25242 ## Motivation and Context prestodb/rfcs#38 ## Test Plan Build package and test in verifier: 230498 ## Release Notes Please follow [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines) and fill in the release notes below. ``` == RELEASE NOTES == Prestissimo (Native Execution) Changes * Update thrift IDL to expand connector specific fields ```
## Description - Native changes to expand connector specific fields for thrift migration - Depends on prestodb#25242 ## Motivation and Context prestodb/rfcs#38 ## Test Plan Build package and test in verifier: 230498 ## Release Notes Please follow [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines) and fill in the release notes below. ``` == RELEASE NOTES == Prestissimo (Native Execution) Changes * Update thrift IDL to expand connector specific fields ```
## Description - Native changes to expand connector specific fields for thrift migration - Depends on prestodb#25242 ## Motivation and Context prestodb/rfcs#38 ## Test Plan Build package and test in verifier: 230498 ## Release Notes Please follow [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines) and fill in the release notes below. ``` == RELEASE NOTES == Prestissimo (Native Execution) Changes * Update thrift IDL to expand connector specific fields ```
## Description - Native changes to expand connector specific fields for thrift migration - Depends on prestodb#25242 ## Motivation and Context prestodb/rfcs#38 ## Test Plan Build package and test in verifier: 230498 ## Release Notes Please follow [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines) and fill in the release notes below. ``` == RELEASE NOTES == Prestissimo (Native Execution) Changes * Update thrift IDL to expand connector specific fields ```
Description
Motivation and Context
prestodb/rfcs#38
Test Plan
Build package and test in verifier: 230498
Release Notes
Please follow release notes guidelines and fill in the release notes below.