Commit c4e480d
authored
Core: Fix view version ID deduplication with schema ID assignment (apache#14434)
Without this fix the test would fail with
```
Cannot set current version to unknown version: 3
java.lang.IllegalArgumentException: Cannot set current version to unknown version: 3
at org.apache.iceberg.relocated.com.google.common.base.Preconditions.checkArgument(Preconditions.java:190)
at org.apache.iceberg.view.ViewMetadata$Builder.setCurrentVersionId(ViewMetadata.java:241)
at org.apache.iceberg.view.TestViewMetadata.deduplicatingViewVersionByIdAndAssigningSchemaId(TestViewMetadata.java:991)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
```
because the the `ViewVersion` was assigned a new ID and later when we tried to re-assign the schema ID, we used the wrong `ViewVersion` instance (the one where the version ID was not re-assigned).1 parent fa62ec1 commit c4e480d
File tree
2 files changed
+22
-3
lines changed- core/src
- main/java/org/apache/iceberg/view
- test/java/org/apache/iceberg/view
2 files changed
+22
-3
lines changedLines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
300 | | - | |
| 299 | + | |
301 | 300 | | |
302 | 301 | | |
303 | 302 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
975 | 975 | | |
976 | 976 | | |
977 | 977 | | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
978 | 998 | | |
979 | 999 | | |
980 | 1000 | | |
| |||
0 commit comments