|
37 | 37 | --storage-option secret_access_key=password --storage-option region=us-east-1 \\ |
38 | 38 | --storage-option allow_http=true |
39 | 39 | # then sync tree/ and _refs/branches/ from that location back |
| 40 | + # store the branch under an ASCII name before committing (Bash syntax) |
| 41 | + mv preinstalled_data/lance/unicode_branch.lance/tree/$'dev\\u1c89' \\ |
| 42 | + preinstalled_data/lance/unicode_branch.lance/tree/dev_u1c89 |
40 | 43 | python3 lance_build_unicode_branch.py --check preinstalled_data/lance |
41 | 44 |
|
42 | 45 | Build it with pylance 12.0.0, the Lance the FE uses, not the writer pinned in |
43 | 46 | lance_fixture_requirements.txt: Lance 7 stores a non-ASCII branch directory percent-encoded |
44 | 47 | (tree/dev%E1%B2%89/), which Lance 12 does not find, while Lance 12 stores it as tree/dev\u1c89/. |
45 | | -The catalog build carries the fixture over as-is. --check runs with any reader. |
| 48 | +The repository stores that directory as tree/dev_u1c89/ so checkout does not depend on |
| 49 | +filesystem Unicode support. iceberg.yaml.tpl restores the original object keys after |
| 50 | +uploading to MinIO. The catalog build carries the portable fixture over as-is. |
| 51 | +--check verifies this stored layout and runs with any reader. |
46 | 52 | """ |
47 | 53 | import argparse |
48 | 54 | import shutil |
|
52 | 58 | import pyarrow as pa |
53 | 59 |
|
54 | 60 | UNICODE_BRANCH_DIR = "unicode_branch.lance" |
55 | | -BRANCH = "dev" |
| 61 | +BRANCH = "dev\u1c89" |
| 62 | +STORED_BRANCH = "dev_u1c89" |
56 | 63 | PARENT_URI = "s3://warehouse/lance/unicode_branch.lance" |
57 | 64 | WRITER_VERSION = "12.0.0" |
58 | 65 | DIMENSION = 4 |
@@ -102,8 +109,8 @@ def check(output: Path) -> None: |
102 | 109 | assert [v["version"] for v in dataset.versions()] == [1], dataset.versions() |
103 | 110 | assert row_ids(dataset) == list(range(1, 9)), "main rows differ" |
104 | 111 | assert list(dataset.branches.list()) == [BRANCH], dataset.branches.list() |
105 | | - # The branch directory keeps the name as is; Lance 12 does not find a percent-encoded one. |
106 | | - manifests = sorted((output / "tree" / BRANCH / "_versions").glob("*.manifest")) |
| 112 | + # Keep Git paths portable; the upload restores the exact name Lance 12 resolves. |
| 113 | + manifests = sorted((output / "tree" / STORED_BRANCH / "_versions").glob("*.manifest")) |
107 | 114 | assert len(manifests) == 2, f"branch {BRANCH!r} must carry versions 1 and 2: {manifests}" |
108 | 115 | for manifest in manifests: |
109 | 116 | assert PARENT_URI.encode() in manifest.read_bytes(), f"{manifest} must reference {PARENT_URI}" |
|
0 commit comments