daviddallakyan2005 opened a new pull request, #3011: URL: https://github.com/apache/iceberg-rust/pull/3011
## Which issue does this PR close? - Part of #1690. ## What changes are included in this PR? Working REST client for server-side scan planning (Go's `catalog/rest/scan_planning.go`), without wiring `TableScan`. Design note: https://github.com/apache/iceberg-rust/issues/1690#issuecomment-5307145618 - Named endpoints for plan / fetch-result / cancel / fetch-tasks, **not** in `DEFAULT_ENDPOINTS`. - Inherent methods on `RestCatalog` (`plan_table_scan`, `fetch_planning_result`, `cancel_planning`, `fetch_scan_tasks`, `wait_for_plan`). `Catalog` is untouched. - 404 split by `error.type` (`NoSuchTable` / `NoSuchNamespace` / `NoSuchPlanId` / `NoSuchPlanTask`). - UUIDv7 `Idempotency-Key` on POSTs; opaque `plan-id` as a single path segment. - `wait_for_plan` poller with jittered backoff, retry on 408/429/5xx, cancel on timeout / max retries / drop. - `supports_remote_scan_planning` stays **false** until task decoding exists (same as Go today). File payloads keep `data-file` as JSON. Follow-ups: content-file decoder, `TableScan` routing, plan-scoped FileIO (#2651/#2932), DataFusion (#2671). `wait_for_plan` is a per-plan poll loop (default 10 retries after the first GET, jittered 100ms–5s backoff, one GET plus JSON parse per attempt) and completed/fetch-tasks payloads keep each data-file and delete-file as a `serde_json::Value` tree, so a large plan materializes the full REST JSON DOM in memory once rather than decoded `FileScanTask` structs. ## Are these changes tested? Mockito unit tests in `iceberg-catalog-rest` (no docker / `iceberg-rest-fixture`): ```bash cargo test -p iceberg-catalog-rest --lib cargo clippy -p iceberg-catalog-rest --all-targets --all-features -- -D warnings cargo fmt -p iceberg-catalog-rest -- --check cargo public-api -p iceberg-catalog-rest --all-features -ss ``` Local result: 101 lib tests passed, clippy `-D warnings` clean, `public-api.txt` updated. ## AI Disclosure https://iceberg.apache.org/contribute/#guidelines-for-ai-assisted-contributions AI assistance was used to draft the client, tests, and this description. The port was checked against Go `scan_planning.go` and existing REST catalog patterns. Tests and clippy were run locally as above. Reviewer focus: `wait_for_plan` drop-cancel clones an uninitialized `RestCatalog` (an extra `GET /v1/config` on abort); `Retry-After` parses delta-seconds only, not HTTP-date. -- 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]
