Commit e497fb1
authored
fix: Update view version log timestamp for historical accuracy (#1218)
## What changes are included in this PR?
This change updates the behavior when setting a view version as current.
When we set a previously existing view version as current, we now update
its log timestamp to the current time rather than reusing the original
timestamp of the ViewVersion.
Lets assume the following changes:
1. ViewVersion 1 is added and set active
2. View Version 2 is added and set active
3. View Version 1 is set active.
This resulted in the following `version_log`:
```json
"version-log": [
{
"version-id": 1,
"timestamp-ms": 1744716416168
},
{
"version-id": 2,
"timestamp-ms": 1744716449754
},
{
"version-id": 1,
"timestamp-ms": 1744716416168
}
],
```
Note that the last and first entries have the same timestamp, namely the
time stamp of the initial ViewVersion creation.
I believe this is undesired in a history, where we are interested when a
certain change became active. It makes sense to use the exact timestamp
of the ViewVersion if it was added in the same set of changes, but
re-enabling a previously used view version (maybe years ago) should not
add a history for this past timestamp.
Java behaviors the same way as rust currently does. @Fokko @nastra if we
agree that we should change the behavior, we should also touch Java.
## Are these changes tested?
Yes1 parent 31b0c0a commit e497fb1
File tree
2 files changed
+70
-5
lines changed- crates/iceberg/src/spec
2 files changed
+70
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
232 | 238 | | |
233 | 239 | | |
234 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
223 | 236 | | |
224 | 237 | | |
225 | 238 | | |
| |||
257 | 270 | | |
258 | 271 | | |
259 | 272 | | |
260 | | - | |
261 | | - | |
262 | | - | |
| 273 | + | |
| 274 | + | |
263 | 275 | | |
264 | 276 | | |
265 | 277 | | |
| |||
293 | 305 | | |
294 | 306 | | |
295 | 307 | | |
296 | | - | |
297 | 308 | | |
298 | 309 | | |
299 | 310 | | |
| |||
852 | 863 | | |
853 | 864 | | |
854 | 865 | | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
855 | 914 | | |
856 | 915 | | |
857 | 916 | | |
| |||
0 commit comments