Skip to content

fix(cli): validate refs type before loading table - #1759

Merged
zeroshade merged 1 commit into
apache:mainfrom
jx2lee:jx2lee/check-ref-types
Aug 12, 2026
Merged

fix(cli): validate refs type before loading table#1759
zeroshade merged 1 commit into
apache:mainfrom
jx2lee:jx2lee/check-ref-types

Conversation

@jx2lee

@jx2lee jx2lee commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Reject invalid refs --type values before loading table metadata
  • Allow only branch, tag, or an omitted type filter.

Testing

  • go test ./cmd/iceberg -run TestRunRefsRejectsInvalidTypeBeforeLoad -v
  • go test ./cmd/iceberg

@jx2lee
jx2lee marked this pull request as ready for review August 12, 2026 00:19
@jx2lee
jx2lee requested a review from zeroshade as a code owner August 12, 2026 00:19

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

Clean pre-flight validation — constants not literals, the output.Error path so --output json is respected, and the load-tracking assertion proving metadata is never fetched for an invalid type is exactly the right test shape. Thanks!


This review was drafted with an AI-assisted tool and may contain mistakes; an Apache Iceberg Go maintainer has reviewed and confirmed the submission. See the contributing docs for what the project considers a maintainer review.

@zeroshade
zeroshade merged commit 08ac7cf into apache:main Aug 12, 2026
15 checks passed
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.

2 participants