Skip to content

Add DeleteFiles table update API#13

Open
manuzhang wants to merge 3 commits into
mainfrom
codex/add-deletefiles-api
Open

Add DeleteFiles table update API#13
manuzhang wants to merge 3 commits into
mainfrom
codex/add-deletefiles-api

Conversation

@manuzhang
Copy link
Copy Markdown
Owner

Motivation

  • Introduce a table-update action to express physical file deletions in commit payloads so catalog/commit flows can carry instructions to remove metadata-backed files without changing other table metadata.

Description

  • Add a new TableUpdate::Kind::kDeleteFiles enum and a table::DeleteFiles class with a std::vector<std::string> files() payload in src/iceberg/table_update.h.
  • Implement DeleteFiles methods in src/iceberg/table_update.cc where ApplyTo/GenerateRequirements are no-ops and provide Equals and Clone implementations.
  • Extend JSON serde to serialize/deserialize the action "delete-files" with the files field in src/iceberg/json_serde.cc and add a unit test covering the DeleteFiles JSON roundtrip in src/iceberg/test/json_serde_test.cc.

Testing

  • Added a unit test JsonInternalTest.TableUpdateDeleteFiles exercising ToJson and TableUpdateFromJson for DeleteFiles which is included in src/iceberg/test/json_serde_test.cc (test not executed here).
  • Attempted to configure the project with cmake -S . -B build -DBUILD_TESTING=ON to run tests but configuration failed due to blocked external dependency downloads (HTTP 403 via proxy), so test suite was not run in this environment.

Codex Task

@manuzhang
Copy link
Copy Markdown
Owner Author

@chatgpt-codex-connector
Copy link
Copy Markdown

Summary

  • Added API documentation above table::DeleteFiles to explicitly align C++ path-matching behavior with the Java DeleteFiles semantics referenced in the PR comment (exact metadata path matching; differently-normalized equivalent URIs are not treated as matches).
  • Committed the change on branch work with commit 9f6b774ca53e412ade9d0a54e57aebea44609b67.
  • Created a follow-up PR message via make_pr with title: “docs: align DeleteFiles semantics with Iceberg Java API reference”.

Testing

  • git status --short
  • git add src/iceberg/table_update.h && git commit -m "Clarify DeleteFiles path matching semantics"
  • nl -ba src/iceberg/table_update.h | sed -n '606,628p'

View task →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant