Commit da70e10
authored
Fix StaticTable._metadata_location_from_version_hint metadata location format ERROR (#2609)
<!--
Thanks for opening a pull request!
-->
<!-- In the case this PR will resolve an issue, please replace
${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
# Rationale for this change
To fix StaticTable._metadata_location_from_version_hint metadata
location format ERROR:
```python
if content.endswith(".metadata.json"):
return os.path.join(metadata_location, "metadata", content)
elif content.isnumeric():
return os.path.join(metadata_location, "metadata", "v%s.metadata.json").format(content)
else:
return os.path.join(metadata_location, "metadata", "%s.metadata.json").format(content)
```
Closes #2608
## Are these changes tested?
Yes.
Added 2 more cases with numeric and non numeric metadata version hints.
## Are there any user-facing changes?
No
<!-- In the case of user-facing changes, please add the changelog label.
-->1 parent cc14158 commit da70e10
File tree
3 files changed
+41
-10
lines changed- pyiceberg/table
- tests
- table
3 files changed
+41
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1624 | 1624 | | |
1625 | 1625 | | |
1626 | 1626 | | |
1627 | | - | |
| 1627 | + | |
1628 | 1628 | | |
1629 | | - | |
| 1629 | + | |
1630 | 1630 | | |
1631 | 1631 | | |
1632 | 1632 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1135 | 1135 | | |
1136 | 1136 | | |
1137 | 1137 | | |
1138 | | - | |
1139 | | - | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
1140 | 1141 | | |
1141 | 1142 | | |
1142 | | - | |
1143 | 1143 | | |
1144 | 1144 | | |
1145 | 1145 | | |
1146 | 1146 | | |
1147 | 1147 | | |
1148 | 1148 | | |
1149 | | - | |
| 1149 | + | |
1150 | 1150 | | |
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
1154 | 1175 | | |
1155 | 1176 | | |
1156 | 1177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
363 | 373 | | |
364 | 374 | | |
365 | 375 | | |
| |||
0 commit comments