Revanth14 commented on code in PR #2162: URL: https://github.com/apache/iceberg-go/pull/2162#discussion_r4331168294
########## README.md: ########## @@ -138,14 +138,33 @@ submission, polling, and task retrieval. Cancellation is best-effort and is not required for automatic remote planning. In `auto` mode, catalogs without a planner retain local planning. -The scanner does not honor the REST `scan-planning-mode` configuration key -(`client`/`server`). A catalog requiring `server` mode may rely on planning to -vend plan-scoped storage credentials. Default local planning, explicit `local`, -or an `auto` fallback can instead read manifests with the table's storage -credentials, which may use a different identity or lack the required access. -For these deployments, explicitly select `table.ScanPlanningRemote` on every -scan; do not rely on the server configuration or `auto` to enforce remote -planning. Remote mode returns an error if a required capability is missing. +Scans follow the catalog's `scan-planning-mode` directive (`client`/`server`). +The directive is resolved with the same precedence as the Java client: the +table-load response's `config` block wins, and the catalog's own +`scan-planning-mode` property (including `/v1/config` defaults and overrides) +applies when the server sends none. A mismatch between the two is logged. +Read it with `tbl.ScanPlanningDirective()`. + +| Directive | Scan option | Result | +| :-------- | :---------- | :----- | +| `server` | none, `auto`, or `remote` | Plan remotely. | +| `server` | `local` | Error. | +| `client` | none, `auto`, or `local` | Plan locally. | +| `client` | `remote` | Error. | +| none | any | As described above. | + +Two behaviors are specific to this client. The directive is checked when a +scan is planned, not when the table is loaded, so a `server` table whose +catalog does not advertise the plan endpoint can still be loaded and committed +to; planning it returns an error. An unrecognized directive value likewise +fails only at planning. And an explicit scan option that conflicts with the +directive is rejected rather than overridden. + +Incremental append and changelog scans only plan locally, so they return an Review Comment: Moved it into the Go-specific paragraph in the latest commit, noting that Java plans incremental scans locally, and updated the PR description bullet to match. -- 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]
