Skip to content
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

Throw better error message when replacing corrupted iceberg table #24221

Merged

Conversation

posulliv
Copy link
Contributor

@posulliv posulliv commented Nov 22, 2024

Description

Throw a better user facing error when doing a CREATE OR REPLACE TABLE operation on an iceberg table with corrupted metadata.

Previously, this operation would return this error:

java.lang.ClassCastException: class io.trino.plugin.iceberg.CorruptedIcebergTableHandle cannot be cast to class io.trino.plugin.iceberg.IcebergTableHandle (io.trino.plugin.iceberg.CorruptedIcebergTableHandle and io.trino.plugin.iceberg.IcebergTableHandle are in unnamed module of loader io.trino.server.PluginClassLoader @6f4201f2)

With this change, the error returned to the user is:

Metadata not found in metadata location for table <table-name>

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

@github-actions github-actions bot added the iceberg Iceberg connector label Nov 22, 2024
@posulliv posulliv force-pushed the iceberg-create-or-replace-corrupted-table branch from 49db82e to f6fdec1 Compare November 22, 2024 01:54
@posulliv posulliv force-pushed the iceberg-create-or-replace-corrupted-table branch from f6fdec1 to ac93d66 Compare November 22, 2024 19:22
@ebyhr ebyhr force-pushed the iceberg-create-or-replace-corrupted-table branch from ac93d66 to 3891e68 Compare November 22, 2024 23:57
@ebyhr ebyhr merged commit 5a6ff9e into trinodb:master Nov 23, 2024
41 checks passed
@github-actions github-actions bot added this to the 466 milestone Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iceberg Iceberg connector
Development

Successfully merging this pull request may close these issues.

2 participants