fluss icon indicating copy to clipboard operation
fluss copied to clipboard

[lake/lance] Support ADD COLUMN schema evolution for Lance lake catalog

Open dstolis opened this issue 1 month ago • 0 comments

Search before asking

  • [x] I searched in the issues and found nothing similar.

Motivation

#2189 added ADD COLUMN support for Paimon-enabled tables, including the server-side lake sync, and #2592 extended it to Iceberg. Lance is the remaining lake format: LanceLakeCatalog#alterTable always throws UnsupportedOperationException("Alter table is not supported for Lance at the moment").

Since MetadataManager#alterTableSchema syncs schema changes to the lake before updating the Fluss schema, ALTER TABLE ... ADD COLUMN currently fails for any table with table.datalake.format = lance. ALTER TABLE ... SET for lake properties fails the same way.

Solution

  • Implement LanceLakeCatalog#alterTable:
    • AddColumn → Dataset#addColumns(List<Field>), converting the field via LanceArrowUtils
    • SetOption / ResetOption → Dataset#updateConfig / Dataset#deleteConfigKeys
    • reject other changes with a clear error
  • Make retries safe like IcebergLakeCatalog: skip AddColumn if the Lance schema already matches the expected Fluss schema.
  • Tests: a LanceLakeCatalog unit test, plus an ITCase that tiers data, adds a column, tiers again, and verifies old rows read back with nulls.

Anything else?

No response

Willingness to contribute

  • [x] I'm willing to submit a PR!

dstolis avatar Oct 26 '26 10:10 dstolis