Skip to content

fix(native): Fix protocol generation#26956

Merged
pdabre12 merged 1 commit intoprestodb:masterfrom
pdabre12:fix-protocol
Jan 13, 2026
Merged

fix(native): Fix protocol generation#26956
pdabre12 merged 1 commit intoprestodb:masterfrom
pdabre12:fix-protocol

Conversation

@pdabre12
Copy link
Copy Markdown
Contributor

@pdabre12 pdabre12 commented Jan 13, 2026

Description

Fix protocol generation after changes introduced by #24302 by running the make presto_protocol command.

Impact

No impact

Test Plan

CI

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.
  • If adding new dependencies, verified they have an OpenSSF Scorecard score of 5.0 or higher (or obtained explicit TSC approval for lower scores).

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== NO RELEASE NOTE ==

@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Jan 13, 2026
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Jan 13, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates native Iceberg protocol enums and JSON mapping to include the new METADATA_LOG_ENTRIES table type, aligning native protocol generation with recent upstream changes.

Class diagram for updated IcebergTableType enum and JSON mapping

classDiagram
  class IcebergTableType {
    <<enumeration>>
    TABLE
    PARTITIONS
    FILES
    REFS
    METADATA_LOG_ENTRIES
    PROPERTIES
    CHANGELOG
    EQUALITY_DELETES
  }

  class IcebergTableType_enum_table {
    +IcebergTableType key
    +json value
  }

  IcebergTableType_enum_table --> IcebergTableType : maps
Loading

File-Level Changes

Change Details Files
Extend IcebergTableType enum and its JSON serialization mapping to support the new METADATA_LOG_ENTRIES table type.
  • Add METADATA_LOG_ENTRIES value to the IcebergTableType enum to keep it in sync with upstream Presto changes.
  • Register METADATA_LOG_ENTRIES in the IcebergTableType to JSON conversion table used by the native protocol layer.
presto-native-execution/presto_cpp/presto_protocol/connector/iceberg/presto_protocol_iceberg.h
presto-native-execution/presto_cpp/presto_protocol/connector/iceberg/presto_protocol_iceberg.cpp

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

@pdabre12 pdabre12 marked this pull request as ready for review January 13, 2026 19:15
@pdabre12 pdabre12 requested review from a team as code owners January 13, 2026 19:15
@prestodb-ci prestodb-ci requested review from a team, libianoss and xin-zhang2 and removed request for a team January 13, 2026 19:15
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 found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `presto-native-execution/presto_cpp/presto_protocol/connector/iceberg/presto_protocol_iceberg.cpp:460` </location>
<code_context>
         {IcebergTableType::PARTITIONS, "PARTITIONS"},
         {IcebergTableType::FILES, "FILES"},
         {IcebergTableType::REFS, "REFS"},
+        {IcebergTableType::METADATA_LOG_ENTRIES, "METADATA_LOG_ENTRIES"},
         {IcebergTableType::PROPERTIES, "PROPERTIES"},
         {IcebergTableType::CHANGELOG, "CHANGELOG"},
</code_context>

<issue_to_address>
**issue (review_instructions):** The new IcebergTableType enumerator METADATA_LOG_ENTRIES should follow kPascalCase naming instead of UPPER_SNAKE_CASE.

Per the guidelines, enumerators should use kPascalCase (e.g., kMetadataLogEntries). Even though existing values in this enum use UPPER_SNAKE_CASE, new additions should follow the current convention unless there is an explicit decision to keep the legacy style here.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `presto-native-execution/**/*.hpp,presto-native-execution/**/*.cpp`

**Instructions:**
Use kPascalCase for static constants and enumerators.

</details>
</issue_to_address>

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.

@pdabre12 pdabre12 merged commit b2255b6 into prestodb:master Jan 13, 2026
114 of 132 checks passed
@pdabre12 pdabre12 deleted the fix-protocol branch January 13, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:IBM PR from IBM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants