Skip to content

Support key-only delete for primary-key tables #267

@qusijun

Description

@qusijun

Problem

For primary-key tables, delete records currently go through the normal row-based write path as RowKind::Delete.

In practice, this seems to require callers to provide a full row, even when the delete is logically identified only by the primary key.

Why this is an issue

For common delete-by-PK use cases, this can be inefficient:

  • callers may only know the primary key, not the full previous row
  • if non-PK fields are required, callers may need to read the old row first
  • this adds unnecessary read, serialization, and write-path overhead

This makes the current behavior closer to a changelog-style row delete than a true key-only delete.

Expected behavior

It would be useful to support key-only delete for PK tables, so callers can delete using only primary key fields without reconstructing the full row.

Possible directions:

  • add a dedicated key-only delete API
  • allow delete input with only PK fields
  • represent such deletes internally as tombstones / key-only delete records
  • optimize the path to avoid full-row materialization where possible

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions