Skip to content

Conversation

@vhsu14
Copy link
Contributor

@vhsu14 vhsu14 commented Jul 1, 2025

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.

== RELEASE NOTES ==
Prestissimo (Native Execution) Changes
* Update thrift IDL to expand connector specific fields 

@vhsu14 vhsu14 requested a review from a team as a code owner July 1, 2025 20:40
@facebook-github-bot
Copy link
Collaborator

This pull request was exported from Phabricator. Differential Revision: D77612938

void toThrift(
const std::shared_ptr<
facebook::presto::protocol::ConnectorTransactionHandle>& proto,
ConnectorTransactionHandleWrapper& thrift) {}
Copy link
Contributor Author

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);
}
Copy link
Contributor Author

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
arhimondr previously approved these changes Jul 2, 2025
Copy link
Member

@arhimondr arhimondr left a 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;
Copy link
Member

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;
Copy link
Member

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;
Copy link
Member

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?

Copy link
Contributor Author

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

vhsu14 added a commit to vhsu14/presto that referenced this pull request Jul 3, 2025
Summary:

Rollback Plan:

Differential Revision: D77612938
@vhsu14 vhsu14 force-pushed the export-D77612938 branch from 309a46f to 112a7a3 Compare July 3, 2025 06:38
@facebook-github-bot
Copy link
Collaborator

This pull request was exported from Phabricator. Differential Revision: D77612938

arhimondr
arhimondr previously approved these changes Jul 3, 2025
tanjialiang
tanjialiang previously approved these changes Jul 14, 2025
vhsu14 pushed a commit to vhsu14/presto that referenced this pull request Jul 14, 2025
Summary: Pull Request resolved: prestodb#25474

Reviewed By: tanjialiang

Differential Revision: D77612938
@vhsu14 vhsu14 dismissed stale reviews from tanjialiang and arhimondr via 6144d78 July 14, 2025 19:43
@vhsu14 vhsu14 force-pushed the export-D77612938 branch from 112a7a3 to 6144d78 Compare July 14, 2025 19:43
@facebook-github-bot
Copy link
Collaborator

This pull request was exported from Phabricator. Differential Revision: D77612938

vhsu14 pushed a commit to vhsu14/presto that referenced this pull request Jul 14, 2025
Summary: Pull Request resolved: prestodb#25474

Reviewed By: tanjialiang

Differential Revision: D77612938
@vhsu14 vhsu14 force-pushed the export-D77612938 branch from 6144d78 to c18d4d0 Compare July 14, 2025 19:47
vhsu14 pushed a commit to vhsu14/presto that referenced this pull request Jul 14, 2025
Summary: Pull Request resolved: prestodb#25474

Reviewed By: tanjialiang

Differential Revision: D77612938
@vhsu14 vhsu14 force-pushed the export-D77612938 branch from c18d4d0 to 4e72a6a Compare July 14, 2025 20:30
vhsu14 pushed a commit to vhsu14/presto that referenced this pull request Jul 14, 2025
Summary: Pull Request resolved: prestodb#25474

Reviewed By: tanjialiang

Differential Revision: D77612938
vhsu14 added a commit to vhsu14/presto that referenced this pull request Jul 15, 2025
Summary: Pull Request resolved: prestodb#25474

Reviewed By: tanjialiang

Differential Revision: D77612938
@vhsu14 vhsu14 force-pushed the export-D77612938 branch from 4e72a6a to 09b8215 Compare July 15, 2025 05:07
@facebook-github-bot
Copy link
Collaborator

This pull request was exported from Phabricator. Differential Revision: D77612938

Summary: Pull Request resolved: prestodb#25474

Reviewed By: tanjialiang

Differential Revision: D77612938
@vhsu14 vhsu14 force-pushed the export-D77612938 branch from 09b8215 to d936e01 Compare July 15, 2025 05:12
@gggrace14 gggrace14 self-requested a review July 15, 2025 16:51
@shangm2 shangm2 merged commit 17a99a7 into prestodb:master Jul 15, 2025
116 of 117 checks passed
@prestodb-ci
Copy link
Contributor

Saved that user @vhsu14 is from Meta

lga-zurich pushed a commit to lga-zurich/presto-exchange that referenced this pull request Sep 2, 2025
## 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 

```
lga-zurich pushed a commit to lga-zurich/presto-exchange that referenced this pull request Sep 8, 2025
## 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 

```
lga-zurich pushed a commit to lga-zurich/presto-exchange that referenced this pull request Sep 8, 2025
## 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 

```
lga-zurich pushed a commit to lga-zurich/presto-exchange that referenced this pull request Sep 8, 2025
## 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 

```
lga-zurich pushed a commit to lga-zurich/presto-exchange that referenced this pull request Sep 8, 2025
## 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 

```
lga-zurich pushed a commit to lga-zurich/presto-exchange that referenced this pull request Sep 8, 2025
## 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 

```
lga-zurich pushed a commit to lga-zurich/presto-exchange that referenced this pull request Sep 8, 2025
## 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 

```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants