Skip to content

fix: preserve Unicode tag names when listing dataset tags - #11352

Merged
Xuanwo merged 7 commits into
lance-format:mainfrom
jackylee-ch:fix/unicode-tag-names
Dec 2, 2026
Merged

Xuanwo merged 7 commits into
lance-format:mainfrom
jackylee-ch:fix/unicode-tag-names

Conversation

@jackylee-ch

@jackylee-ch jackylee-ch commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Creating a legal tag such as é can make listing fail for the whole dataset, including unrelated ASCII tags. The reader reconstructs a path from a storage filename and escapes it twice.

Read each tag from the object location returned by the listing. Decode the filename separately for the public name. When historical records decode to the same name, give that name to the record addressed by tag lookup and deletion. Return the other records under distinct, listing-only escaped keys so cleanup sees every tagged version. This uses the file locations provided by #11351.

The regression fixture was written by Lance 14.0.3 using native S3 and OpenDAL. It contains two records for é pointing to versions 1 and 2, plus release at version 3. The tests check both listing APIs, run cleanup against versions 1 and 2, and reopen both snapshots. Each S3 adapter also lists, looks up and deletes its own record while preserving the other version. Further tests cover directory namespace listing and both directions of an S3 adapter switch.

If only the other S3 adapter's record remains, listing still returns the Unicode name. Direct lookup by that name can return “tag does not exist” on the current adapter. To remove that record, use the original Unicode name through the adapter that wrote it.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added A-python Python bindings A-encoding Encoding, IO, file reader/writer A-namespace Namespace impls bug Something isn't working labels Nov 21, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 21, 2026

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

AI-assisted technical review of 59ecd878 — compatibility blocker

Datasets written by 14.0.3 or by the parent of this change can contain two stored tag records that both decode to é, referencing versions 1 and 2, alongside an unrelated release tag. The OpenDAL baseline enumerates all three records. With the reviewed CI wheel, ordered and unordered listing both fail on native S3 and OpenDAL with Multiple files for the same tag. Callers lose access to release through listing as well.

Please preserve compatible reads in the core tag layer. Cleanup uses tag listing to identify protected versions, so choosing either é record would omit the other version. Add a regression that reads pre-fix data, checks that release remains visible through both listing APIs, and verifies that cleanup sees both referenced versions. Rebase the tag change after #11351 lands.

Recover the logical tag name before reading its metadata through the canonical dataset path. Reject ambiguous listings so version retention sees the same tag names and versions as direct lookup.
@jackylee-ch
jackylee-ch force-pushed the fix/unicode-tag-names branch from 59ecd87 to 19f9b88 Compare November 29, 2026 09:36
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 29, 2026
@jackylee-ch
jackylee-ch force-pushed the fix/unicode-tag-names branch from 19f9b88 to bdb5f03 Compare November 29, 2026 09:48
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 29, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Dec 2, 2026

@lance-gatekeeper lance-gatekeeper Bot 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.

✅ Gate recommendation: approve.

Reading tag contents from their listed locations fixes Unicode listing. The historical duplicate-tag concern is addressed: every record remains visible to cleanup, and when records collide, the logical name selects the snapshot used by lookup and deletion. The listing prerequisite #11351 has merged.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Dec 2, 2026
@Xuanwo
Xuanwo merged commit 67574a9 into lance-format:main Dec 2, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-encoding Encoding, IO, file reader/writer A-namespace Namespace impls A-python Python bindings bug Something isn't working K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants