Skip to content

refactor(iceberg): Remove unnecessary column type translation method#26172

Merged
hantangwangd merged 1 commit intoprestodb:masterfrom
hantangwangd:remove_unnecessary_method
Oct 1, 2025
Merged

refactor(iceberg): Remove unnecessary column type translation method#26172
hantangwangd merged 1 commit intoprestodb:masterfrom
hantangwangd:remove_unnecessary_method

Conversation

@hantangwangd
Copy link
Member

@hantangwangd hantangwangd commented Sep 28, 2025

Description

In PR #21662, we have merged IcebergColumnHandle.ColumnType and HiveColumnHandle.ColumnType into a single enum class and extracted it into their common parent class BaseHiveColumnHandle. As a result, the method previously used for converting between these two types, along with its invocations, are no longer necessary. This PR remove the unnecessary method getHiveColumnHandleColumnType and its invocations.

Motivation and Context

  • Remove an unnecessary method and its invocations

Impact

N/A

Test Plan

N/A

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.

Release Notes

== NO RELEASE NOTE ==

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 28, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

With the unified ColumnType enum in BaseHiveColumnHandle, this PR removes the obsolete conversion method and updates call sites to use the unified enum directly.

File-Level Changes

Change Details Files
Remove unnecessary column type translation utility and its usages
  • Deleted getHiveColumnHandleColumnType method and its switch-case logic
  • Replaced calls to getHiveColumnHandleColumnType with direct ColumnType usage
  • Removed exception branch tied to the old conversion method
presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergPageSourceProvider.java

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

@hantangwangd hantangwangd marked this pull request as ready for review September 28, 2025 17:43
@hantangwangd hantangwangd requested review from a team and ZacBlanco as code owners September 28, 2025 17:43
Copy link
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 there - 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.

@tdcmeehan tdcmeehan self-assigned this Sep 28, 2025
Copy link
Member

@agrawalreetika agrawalreetika left a comment

Choose a reason for hiding this comment

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

LGTM

@hantangwangd hantangwangd merged commit 6ef3d26 into prestodb:master Oct 1, 2025
79 of 83 checks passed
@hantangwangd hantangwangd deleted the remove_unnecessary_method branch October 1, 2025 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants