Skip to content

[WIP] Add support for Iceberg format version 3 tables#74

Closed
Copilot wants to merge 3 commits intomasterfrom
copilot/add-iceberg-v3-table-support
Closed

[WIP] Add support for Iceberg format version 3 tables#74
Copilot wants to merge 3 commits intomasterfrom
copilot/add-iceberg-v3-table-support

Conversation

Copy link
Copy Markdown

Copilot AI commented Jan 23, 2026

Implementation Plan for Iceberg v3 Table Support

  • Explore repository structure and understand existing code
  • Update IcebergUtil.java to support max format version 3
    • Added FORMAT_VERSION_SUPPORT_MAX = 3 constant
    • Added OPTIMIZE_MAX_SUPPORTED_TABLE_VERSION = 2 constant
    • Updated parseFormatVersion to validate max supported version
  • Add validation logic to reject unsupported v3 features
    • Added validateTableForTrino method to check for:
      • Column default values (via table properties check)
      • Table encryption (encryption.key-id property)
      • Deletion vectors (already handled by FileContent enum)
    • Simplified validation to work with Iceberg 1.8.1
  • Update mutation operation guards (DELETE, UPDATE, MERGE)
    • Added version check to reject v3 tables in beginDelete
    • Added version check to reject v3 tables in beginUpdate
    • Added version check to reject v3 tables in beginMerge
  • Add version checks for table procedures
    • rewrite_data_files procedure version guard
  • Validate insert operations work with v3 tables
    • Added validateTableForTrino call in beginInsert
  • Code compiles successfully
  • Create comprehensive test suite TestIcebergV3.java
    • Test creating v3 tables
    • Test upgrading v2 to v3 tables
    • Test inserting into v3 tables
    • Test unsupported features throw NOT_SUPPORTED errors
  • Run tests and validate implementation
  • Run code review and security checks
Original prompt

trinodb/trino#27786 Implement the same

Add support for creating Iceberg format version 3 tables, upgrading v2 tables to v3, and inserting into v3 tables.

This change intentionally does not implement Iceberg v3 features beyond allowing v3 metadata and validating that inserts produce the required row-lineage metadata (as observed through the Iceberg library).

To avoid spec violations while v3 support is incomplete, the connector now explicitly rejects v3 features that are not yet supported. The goal is to safely unlock v3 table creation and incremental adoption, while making unsupported behavior fail fast and predictably.

Unsupported v3 features that now throw NOT_SUPPORTED include:

Row-level mutations on v3 tables: DELETE, UPDATE, MERGE
OPTIMIZE on v3 tables
add_files / add_files_from_table procedures on v3 tables
Deletion vectors (PUFFIN delete files)
Column default values (initial-default, write-default)
Iceberg table encryption (encryption-keys / snapshot key-id)
Tests:

Add TestIcebergV3 to cover:

create v3 tables and upgrade v2→v3
inserts into v3 tables produce required lineage metadata (nextRowId, firstRowId, dataSequenceNumber)
unsupported v3 features fail with clear exceptions


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 23, 2026 05:34
Co-authored-by: Joe-Abraham <53977252+Joe-Abraham@users.noreply.github.com>
….8.1

Co-authored-by: Joe-Abraham <53977252+Joe-Abraham@users.noreply.github.com>
Copilot AI requested a review from Joe-Abraham January 23, 2026 05:46
Copilot stopped work on behalf of Joe-Abraham due to an error January 23, 2026 05:46
@Joe-Abraham Joe-Abraham deleted the copilot/add-iceberg-v3-table-support branch January 23, 2026 08:07
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.

2 participants