Skip to content

feat: narrow stream delete formats by destination catalog - #1290

Open
vikaxsh wants to merge 13 commits into
stagingfrom
feat/catalog-aware-update-types
Open

vikaxsh wants to merge 13 commits into
stagingfrom
feat/catalog-aware-update-types

Conversation

@vikaxsh

@vikaxsh vikaxsh commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

Description

Discover now intersects each stream's available_update_types with what the destination's
Iceberg catalog can apply, on top of the target query engines.

  • --destination on discover is parsed (not connected to) for the raw catalog_type,
    read before iceberg's validation folds REST-family catalogs into rest.
  • New per-catalog write matrix, sourced from vendor docs (Oct 2026):
    • nessie: no dv (table spec v3 unsupported)
    • unity: dv only (no identifier fields; Databricks supports no eq/pos delete files)
    • horizon: no eq (rejected from external engines)

No --destination keeps today's behavior: delete formats are constrained by engines only.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Scenario A
  • Scenario B

Screenshots or Recordings

Documentation

  • Documentation Link: [link to README, olake.io/docs, or olake-docs]
  • N/A (bug fix, refactor, or test changes only)

Related PR's (If Any):

@vikaxsh
vikaxsh deployed to ai-code-review October 6, 2026 12:46 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 6, 2026 12:46 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 6, 2026 12:46 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 6, 2026 12:46 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 6, 2026 12:46 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 6, 2026 12:46 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 6, 2026 12:46 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 6, 2026 12:46 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 6, 2026 12:46 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 6, 2026 12:46 — with GitHub Actions Active
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

🔍 OpenCodeReview found 1 issue(s) in this PR.

  • ✅ Successfully posted inline: 1 comment(s)

Comment thread protocol/discover.go Outdated
Comment thread protocol/discover.go Outdated
@vikaxsh
vikaxsh deployed to integration_tests October 16, 2026 13:20 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 16, 2026 13:20 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 16, 2026 13:20 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 16, 2026 13:20 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 16, 2026 13:20 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 16, 2026 13:20 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 16, 2026 13:20 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 16, 2026 13:20 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to ai-code-review October 26, 2026 06:34 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 26, 2026 06:34 — with GitHub Actions Active
Comment thread types/delete_mode.go Outdated

@hash-data hash-data left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See if we can make it easy implementation seems complex

Comment thread protocol/discover.go Outdated
Comment on lines +138 to +147
if destinationConfigPath != "not-set" && destinationConfigPath != "" {
destinationConfig = &types.WriterConfig{}
if err := utils.UnmarshalFile(destinationConfigPath, destinationConfig, true); err != nil {
return err
}
}
catalogType, err := types.CatalogTypeFromConfig(destinationConfig)
if err != nil {
return errs.Precondition(errs.ConfigInvalid, codeDestinationConfigInvalid, err)
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what if older ui and new driver version being used?, like old people try to create new job?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

for them without destination flag update type would be based on query engines only

Comment thread types/iceberg_catalog.go Outdated

catalog := writer.CatalogType
if catalog == "" {
catalog = defaultCatalogType

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

so for parquet writer is it going to be default ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

function returns early for parquet dest

Comment thread protocol/discover.go Outdated
Comment on lines +138 to +157
if destinationConfigPath != "not-set" && destinationConfigPath != "" {
destinationConfig = &types.WriterConfig{}
if err := utils.UnmarshalFile(destinationConfigPath, destinationConfig, true); err != nil {
return err
}
}
catalogType, err := types.CatalogTypeFromConfig(destinationConfig)
if err != nil {
return errs.Precondition(errs.ConfigInvalid, codeDestinationConfigInvalid, err)
}

constraints := types.UpdateTypeConstraints{
Engines: engines,
Catalog: catalogType,
AppendOnly: types.DestinationIsAppendOnly(destinationConfig),
}
// Only upsert needs a delete format and append writes none, so the job stays valid: each
// stream gets an empty available_update_types for the UI to report. Expected, so silent,
// for an append-only destination.
if !constraints.AppendOnly && len(constraints.Available()) == 0 {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

let us simplify logic, seems unenecessary complex

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

There isn’t much scope for simplification since this function handles three different responsibilities. We could split it into smaller helper functions, but it wouldn’t provide much benefit

Comment thread types/delete_mode.go Outdated
Comment on lines 53 to 54
return fmt.Errorf("update mode %q is not readable by the target query engines; available are %v", m, available)
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we need to update this error message

Comment thread types/iceberg_catalog.go Outdated
Comment on lines +24 to +40
var icebergCatalogs = []CatalogSpec{
{Catalog: "glue", Supports: []UpdateType{UpdateTypeEquality, UpdateTypePosition, UpdateTypeDeletionVector}},
{Catalog: "jdbc", Supports: []UpdateType{UpdateTypeEquality, UpdateTypePosition, UpdateTypeDeletionVector}},
{Catalog: "hive", Supports: []UpdateType{UpdateTypeEquality, UpdateTypePosition, UpdateTypeDeletionVector}},
{Catalog: "rest", Supports: []UpdateType{UpdateTypeEquality, UpdateTypePosition, UpdateTypeDeletionVector}},
{Catalog: "lakekeeper", Supports: []UpdateType{UpdateTypeEquality, UpdateTypePosition, UpdateTypeDeletionVector}},
// Nessie does not support Iceberg table spec v3, so no deletion vectors.
{Catalog: "nessie", Supports: []UpdateType{UpdateTypeEquality, UpdateTypePosition}},
{Catalog: "s3tables", Supports: []UpdateType{UpdateTypeEquality, UpdateTypePosition, UpdateTypeDeletionVector}},
// Unity rejects identifier columns, which eq keys on (without them OLake falls back to
// append), and Databricks supports neither eq nor pos delete files, only deletion vectors.
{Catalog: "unity", Supports: []UpdateType{UpdateTypeDeletionVector}},
{Catalog: "polaris", Supports: []UpdateType{UpdateTypeEquality, UpdateTypePosition, UpdateTypeDeletionVector}},
// Deletion vectors are in Preview on the BigLake (Lakehouse runtime) catalog.
{Catalog: "biglake", Supports: []UpdateType{UpdateTypeEquality, UpdateTypePosition, UpdateTypeDeletionVector}},
// Snowflake rejects equality deletes from external engines. dv works only on tables created
// at v3: Horizon forbids upgrading an existing v2 table, which switching a stream to dv needs.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

let us only include catalog which does not support all delete type, will be easy

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

@vikaxsh
vikaxsh deployed to integration_tests October 27, 2026 05:14 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 27, 2026 05:30 — with GitHub Actions Active
@vikaxsh
vikaxsh deployed to integration_tests October 27, 2026 06:46 — with GitHub Actions Active

This branch is waiting to be deployed

2 waiting deployments
integration_tests — 088d646b Waiting Oct 27, 2026 by vikaxsh via Approve Test Deployment #362
ai-code-review — 088d646b Waiting Oct 27, 2026 by vikaxsh via OpenCodeReview #737
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