Skip to content

fix(iceberg): encode Nessie hash refs as detached commits - #27223

Closed
iamlinjunhong wants to merge 2 commits into
matrixorigin:mainfrom
iamlinjunhong:m-27221
Closed

iamlinjunhong wants to merge 2 commits into
matrixorigin:mainfrom
iamlinjunhong:m-27221

Conversation

@iamlinjunhong

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #27221

What this PR does / why we need it:

fix(iceberg): encode Nessie hash refs as detached commits

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@matrix-meow matrix-meow added size/M Denotes a PR that changes [100,499] lines and removed size/S Denotes a PR that changes [10,99] lines labels Aug 17, 2026
@iamlinjunhong
iamlinjunhong deleted the m-27221 branch August 17, 2026 06:44
XuPeng-SH pushed a commit that referenced this pull request Aug 18, 2026
## What type of PR is this?

- [ ] API-change
- [x] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Fixes #27221

## What this PR does / why we need it:

Nessie treats a bare commit hash in the Iceberg REST prefix as a named
reference. Encode typed hash refs as detached prefixes using @<commit>,
while leaving branch/tag refs unchanged and preserving the original
hash:<commit> selector in the returned scan plan.

Regression coverage verifies that both credential vending and table
loading receive the detached prefix.

This is the clean replacement for closed PR #27223. The unrelated REST
catalog URI validation change was split into #27226 and has already
merged.

## Verification

- go build ./pkg/iceberg/metadata/...
- go vet ./pkg/iceberg/metadata/...
- go test -v -count=1 -timeout=120s -run
TestRuntimeScanPlannerRewritesNessieHashAsDetachedRef
./pkg/iceberg/metadata
- go test -v -count=1 -timeout=120s ./pkg/iceberg/metadata/...
- go test -v -count=1 -timeout=120s ./pkg/iceberg/maintenance/...
- git diff --check up/main...HEAD

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…in#27254)

## What type of PR is this?

- [ ] API-change
- [x] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Fixes matrixorigin#27221

## What this PR does / why we need it:

Nessie treats a bare commit hash in the Iceberg REST prefix as a named
reference. Encode typed hash refs as detached prefixes using @<commit>,
while leaving branch/tag refs unchanged and preserving the original
hash:<commit> selector in the returned scan plan.

Regression coverage verifies that both credential vending and table
loading receive the detached prefix.

This is the clean replacement for closed PR matrixorigin#27223. The unrelated REST
catalog URI validation change was split into matrixorigin#27226 and has already
merged.

## Verification

- go build ./pkg/iceberg/metadata/...
- go vet ./pkg/iceberg/metadata/...
- go test -v -count=1 -timeout=120s -run
TestRuntimeScanPlannerRewritesNessieHashAsDetachedRef
./pkg/iceberg/metadata
- go test -v -count=1 -timeout=120s ./pkg/iceberg/metadata/...
- go test -v -count=1 -timeout=120s ./pkg/iceberg/maintenance/...
- git diff --check up/main...HEAD

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…in#27254)

## What type of PR is this?

- [ ] API-change
- [x] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Fixes matrixorigin#27221

## What this PR does / why we need it:

Nessie treats a bare commit hash in the Iceberg REST prefix as a named
reference. Encode typed hash refs as detached prefixes using @<commit>,
while leaving branch/tag refs unchanged and preserving the original
hash:<commit> selector in the returned scan plan.

Regression coverage verifies that both credential vending and table
loading receive the detached prefix.

This is the clean replacement for closed PR matrixorigin#27223. The unrelated REST
catalog URI validation change was split into matrixorigin#27226 and has already
merged.

## Verification

- go build ./pkg/iceberg/metadata/...
- go vet ./pkg/iceberg/metadata/...
- go test -v -count=1 -timeout=120s -run
TestRuntimeScanPlannerRewritesNessieHashAsDetachedRef
./pkg/iceberg/metadata
- go test -v -count=1 -timeout=120s ./pkg/iceberg/metadata/...
- go test -v -count=1 -timeout=120s ./pkg/iceberg/maintenance/...
- git diff --check up/main...HEAD

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
…in#27254)

## What type of PR is this?

- [ ] API-change
- [x] BUG
- [ ] Improvement
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring

## Which issue(s) this PR fixes:

Fixes matrixorigin#27221

## What this PR does / why we need it:

Nessie treats a bare commit hash in the Iceberg REST prefix as a named
reference. Encode typed hash refs as detached prefixes using @<commit>,
while leaving branch/tag refs unchanged and preserving the original
hash:<commit> selector in the returned scan plan.

Regression coverage verifies that both credential vending and table
loading receive the detached prefix.

This is the clean replacement for closed PR matrixorigin#27223. The unrelated REST
catalog URI validation change was split into matrixorigin#27226 and has already
merged.

## Verification

- go build ./pkg/iceberg/metadata/...
- go vet ./pkg/iceberg/metadata/...
- go test -v -count=1 -timeout=120s -run
TestRuntimeScanPlannerRewritesNessieHashAsDetachedRef
./pkg/iceberg/metadata
- go test -v -count=1 -timeout=120s ./pkg/iceberg/metadata/...
- go test -v -count=1 -timeout=120s ./pkg/iceberg/maintenance/...
- git diff --check up/main...HEAD

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

This branch had an error being deployed

1 failed deployment
ci — 814003ed Deployed Aug 17, 2026 by iamlinjunhong via Matrixone Utils CI / Coverage #46629
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants