laskoviymishka commented on code in PR #2308:
URL: https://github.com/apache/iceberg-go/pull/2308#discussion_r4368746692
##########
table/transaction.go:
##########
@@ -2247,7 +2247,8 @@ func WithAddFilesConcurrency(concurrency int)
AddFilesOption {
}
}
-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 {
Review Comment:
Could we rename [`AddFilesOption` and
`WithAddFilesConcurrency`](https://github.com/apache/iceberg-go/blob/f08b739672552288305d79e2beb1ccc47c15103a/table/transaction.go#L2234-L2251)
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.
##########
table/transaction.go:
##########
@@ -2247,7 +2247,8 @@ func WithAddFilesConcurrency(concurrency int)
AddFilesOption {
}
}
-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.
Review Comment:
Should this godoc also say how it differs from `AddDataFiles`? Today only
[`AddDataFiles`' own
godoc](https://github.com/apache/iceberg-go/blob/f08b739672552288305d79e2beb1ccc47c15103a/table/transaction.go#L1558-L1563)
spells it out ("this method does not read files from storage").
```suggestion
// AddDataFilesByPath adds data files at the provided paths to the table.
// Unlike AddDataFiles, it opens each file to read its schema and statistics.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]