Skip to content

Core: Fix PlanTableScanResponse validation#14562

Merged
singhpk234 merged 1 commit into
apache:mainfrom
nastra:fix-planning-response
Nov 12, 2025
Merged

Core: Fix PlanTableScanResponse validation#14562
singhpk234 merged 1 commit into
apache:mainfrom
nastra:fix-planning-response

Conversation

@nastra

@nastra nastra commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

The OpenAPI spec indicates in https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml#L3376-L3384 that a completed planning result can have a planId

@nastra nastra requested a review from singhpk234 November 11, 2025 17:12
@github-actions github-actions Bot added the core label Nov 11, 2025
planStatus() != PlanStatus.SUBMITTED || planId() != null,
"Invalid response: plan id should be defined when status is 'submitted'");
"Invalid response: plan id should be defined when status is '%s'",
PlanStatus.SUBMITTED.status());

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

just some refactoring to use the actual enum values here and in other places

@singhpk234 singhpk234 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.

LGTM thanks @nastra ! added a minor suggestion

@singhpk234 singhpk234 merged commit 0ce14b7 into apache:main Nov 12, 2025
44 checks passed
@singhpk234

Copy link
Copy Markdown
Contributor

Thanks @nastra for the fix ! Thanks @huaxingao for the review

@nastra nastra deleted the fix-planning-response branch November 12, 2025 06:42
@nastra nastra added this to the Iceberg 1.10.1 milestone Nov 12, 2025
nastra added a commit to nastra/iceberg that referenced this pull request Nov 12, 2025
nastra added a commit that referenced this pull request Nov 12, 2025
* Core: Fix validation of PlanTableScanRequest (#14561)

The OpenAPI spec says in https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml#L618-L624
that if no snapshotId is provided, the server can select the latest snapshot in the table's main branch. However, currently the request always requires to set either the `snapshotId` or the `startSnapshotId`/`endSnapshotId`

* Core: Fix PlanTableScanResponse validation (#14562)

The OpenAPI spec indicates in https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml#L3376-L3384 that a `completed` planning result can have a `planId`
thomaschow pushed a commit to thomaschow/iceberg that referenced this pull request Jan 19, 2026
talatuyarer pushed a commit to talatuyarer/iceberg that referenced this pull request Apr 1, 2026
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.

3 participants