Skip to content

refactor(table)!: name path-based data file additions explicitly - #2308

Merged
zeroshade merged 7 commits into
apache:mainfrom
fallintoplace:refactor/table-add-data-files-by-path-v1-20261023
Oct 26, 2026
Merged

zeroshade merged 7 commits into
apache:mainfrom
fallintoplace:refactor/table-add-data-files-by-path-v1-20261023

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What

Rename Transaction.AddFiles to AddDataFilesByPath.

Why

Make the path-based API explicit next to AddDataFiles before the v1 freeze.

Implementation

  • Rename the method and update callers and docs.
  • Keep behavior and the existing add-file options unchanged.

Breaking API: callers must use AddDataFilesByPath.
Related: #2062

@laskoviymishka laskoviymishka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

With AddDataFilesByPath mapped back to AddFiles, the only differences from the base are the new godoc and a line wrap in transaction_internal_test.go.

Comment thread table/transaction.go
}

func (t *Transaction) AddFiles(ctx context.Context, filePaths []string, snapshotProps iceberg.Properties, ignoreDuplicates bool, opts ...AddFilesOption) error {
// AddDataFilesByPath adds data files at the provided paths to the table.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this godoc also say how it differs from AddDataFiles? Today only AddDataFiles' own godoc spells it out ("this method does not read files from storage").

Suggested change
// AddDataFilesByPath adds data files at the provided paths to the table.
// AddDataFilesByPath adds data files at the provided paths to the table.
// Unlike AddDataFiles, it opens each file to read its schema and statistics.

Comment thread table/transaction.go Outdated

func (t *Transaction) AddFiles(ctx context.Context, filePaths []string, snapshotProps iceberg.Properties, ignoreDuplicates bool, opts ...AddFilesOption) error {
// AddDataFilesByPath adds data files at the provided paths to the table.
func (t *Transaction) AddDataFilesByPath(ctx context.Context, filePaths []string, snapshotProps iceberg.Properties, ignoreDuplicates bool, opts ...AddFilesOption) error {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we rename AddFilesOption and WithAddFilesConcurrency along with the method, e.g. to AddDataFilesByPathOption / WithAddDataFilesByPathConcurrency (like OverwriteOption / WithOverwriteConcurrency)? git grep finds both only in this file. Renaming them after v1 would mean keeping the old names as aliases.

@laskoviymishka

Copy link
Copy Markdown
Contributor

@fallintoplace thx! :D i failed to fix it via GH ui

Signed-off-by: Minh Vu <vuhoangminh97@gmail.com>
@fallintoplace
fallintoplace force-pushed the refactor/table-add-data-files-by-path-v1-20261023 branch from d93225a to 481dd3f Compare October 25, 2026 11:22
fallintoplace and others added 6 commits October 25, 2026 12:32
…61023

Resolve the collectGeoColumns doc conflict with apache#2303, rename the AddFiles call added by apache#2288's test, and restore the compatibility note from 3b5bc47 dropped by the release-notes sync.
The note for this change lands in a follow-up release-notes PR so the pre-v1 renames can merge in parallel.

@zeroshade zeroshade left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rename is complete, and the godoc now says how AddDataFilesByPath differs from AddDataFiles, per @laskoviymishka's suggestions. I pushed a merge of main (345948a); no AddFiles/AddFilesOption/WithAddFilesConcurrency references remain, and go vet ./... (including -tags integration) and go test ./table/... pass. The compatibility note for this change (dropped by the "sync release notes with main" commit) will land in a single follow-up release-notes PR covering this batch of pre-v1 renames, so these can merge in parallel without releases.md conflicts. LGTM.

@zeroshade
zeroshade merged commit 41593a3 into apache:main Oct 26, 2026
16 checks passed
zeroshade added a commit to fallintoplace/iceberg-go that referenced this pull request Oct 26, 2026
Resolve the test overlaps with the renames already on main (apache#2308, apache#2314, apache#2317, apache#2319): each conflict hunk keeps this PR's sequence-number names with main's other renames applied.
zeroshade added a commit to zeroshade/iceberg-go that referenced this pull request Oct 28, 2026
…g changes

Add release notes for the rename batch (apache#2308, apache#2314, apache#2315, apache#2316, apache#2317,
apache#2319, apache#2322, apache#2323) and for apache#2067, apache#2290, apache#2294, apache#2307, apache#2310 and apache#2313.
Remove stray blank lines inside the compatibility-notes list.
zeroshade added a commit that referenced this pull request Oct 28, 2026
docs(release): add compatibility notes for pre-v1 renames and breaking changes

Add release notes for the rename batch (#2308, #2314, #2315, #2316, #2317,
#2319, #2322, #2323) and for #2067, #2290, #2294, #2307, #2310 and #2313.
Remove stray blank lines inside the compatibility-notes list.
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.

3 participants