Skip to content

misc: Migrate cpp.ref_type and drift.recursive_reference in presto thrift#27248

Merged
aditi-pandit merged 1 commit intoprestodb:masterfrom
iahs:export-D94726708
Mar 5, 2026
Merged

misc: Migrate cpp.ref_type and drift.recursive_reference in presto thrift#27248
aditi-pandit merged 1 commit intoprestodb:masterfrom
iahs:export-D94726708

Conversation

@iahs
Copy link
Copy Markdown
Contributor

@iahs iahs commented Mar 3, 2026

Summary:
Migrate cpp.ref_type and drift.recursive_reference unstructured annotations
to their structured equivalents in presto thrift files:

  • presto_thrift.thrift
  • temp_presto_thrift.thrift

Reviewed By: Mizuchi

== NO RELEASE NOTE ==

Summary by Sourcery

Migrate presto thrift definitions to use structured annotations for ExecutionFailureInfo references.

Enhancements:

  • Replace legacy cpp.ref_type and drift.recursive_reference annotations with structured cpp and thrift annotation usage in presto_thrift.thrift and temp_presto_thrift.thrift.
  • Add cpp and thrift annotation include files to the presto thrift IDL files to support structured annotations.

@iahs iahs requested review from a team as code owners March 3, 2026 00:06
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Mar 3, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Migrates unstructured cpp.ref_type and drift.recursive_reference annotations on ExecutionFailureInfo.cause to their structured equivalents in both presto_thrift.thrift and temp_presto_thrift.thrift, adding the necessary annotation includes.

Class diagram for updated ExecutionFailureInfo.thrift struct

classDiagram
  direction TB

  class ExecutionFailureInfo_Unstructured {
    +string type
    +string message
    +optional ExecutionFailureInfo cause
    +list~ExecutionFailureInfo~ suppressed
    +list~string~ stack
    +ErrorLocation errorLocation
    <<annotations>>
    cause: cpp.ref_type = shared
    cause: drift.recursive_reference = true
  }

  class ExecutionFailureInfo_Structured {
    +string type
    +string message
    +optional ExecutionFailureInfo cause
    +list~ExecutionFailureInfo~ suppressed
    +list~string~ stack
    +ErrorLocation errorLocation
    <<annotations>>
    cause: @cpp.Ref(type = cpp.RefType.SharedMutable)
    cause: @thrift.DeprecatedUnvalidatedAnnotations(items = "drift.recursive_reference=true")
  }

  ExecutionFailureInfo_Unstructured <|-- ExecutionFailureInfo_Structured
Loading

File-Level Changes

Change Details Files
Switch ExecutionFailureInfo.cause reference and recursive annotations from legacy unstructured syntax to structured Thrift/cpp annotations.
  • Add cpp and thrift annotation include files to the Thrift IDL so structured annotations are available.
  • Replace inline cpp.ref_type="shared" annotation with @cpp.Ref{type = cpp.RefType.SharedMutable} on ExecutionFailureInfo.cause.
  • Preserve the previous drift.recursive_reference behavior by encoding it into @thrift.DeprecatedUnvalidatedAnnotations for ExecutionFailureInfo.cause field.
presto-native-execution/presto_cpp/main/thrift/presto_thrift.thrift
presto-native-execution/presto_cpp/main/thrift/temp_presto_thrift.thrift

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Mar 3, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: iahs / name: Shai Szulanski (aba0dfe)

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

iahs added a commit to iahs/presto that referenced this pull request Mar 3, 2026
… thrift (prestodb#27248)

Summary:

Migrate cpp.ref_type and drift.recursive_reference unstructured annotations
to their structured equivalents in presto thrift files:
- presto_thrift.thrift
- temp_presto_thrift.thrift

Reviewed By: Mizuchi

Differential Revision: D94726708
@iahs iahs force-pushed the export-D94726708 branch from 4a4c931 to 024b59a Compare March 3, 2026 18:23
@steveburnett
Copy link
Copy Markdown
Contributor

When you have time, please sign the Presto CLA as mentioned in this comment.

@iahs
Copy link
Copy Markdown
Contributor Author

iahs commented Mar 3, 2026

CLA signed

…presto thrift (prestodb#27248)

Summary:

Migrate cpp.ref_type and drift.recursive_reference unstructured annotations
to their structured equivalents in presto thrift files:
- presto_thrift.thrift
- temp_presto_thrift.thrift

Reviewed By: Mizuchi

Differential Revision: D94726708
@iahs iahs force-pushed the export-D94726708 branch from 024b59a to aba0dfe Compare March 4, 2026 23:50
@iahs iahs changed the title [thrift] Migrate cpp.ref_type and drift.recursive_reference in presto thrift misc: [thrift] Migrate cpp.ref_type and drift.recursive_reference in presto thrift Mar 4, 2026
@iahs iahs changed the title misc: [thrift] Migrate cpp.ref_type and drift.recursive_reference in presto thrift misc: Migrate cpp.ref_type and drift.recursive_reference in presto thrift Mar 4, 2026
Copy link
Copy Markdown
Contributor

@amitkdutta amitkdutta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @iahs

Copy link
Copy Markdown
Contributor

@aditi-pandit aditi-pandit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@aditi-pandit aditi-pandit merged commit 8a4fae0 into prestodb:master Mar 5, 2026
84 of 89 checks passed
garimauttam pushed a commit to garimauttam/presto that referenced this pull request Mar 9, 2026
…rift (prestodb#27248)

Summary:
Migrate cpp.ref_type and drift.recursive_reference unstructured
annotations
to their structured equivalents in presto thrift files:
- presto_thrift.thrift
- temp_presto_thrift.thrift

Reviewed By: Mizuchi

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants