refactor: change from serialising a u64 to i64 - #3065
Conversation
dannycjones
left a comment
There was a problem hiding this comment.
Just noticed this too when reviewing some of the row lineage stuff! Thanks for the PR.
I think this change makes sense, although I think we should extend it to ManifestFile type too which should eliminate the TryInto calls.
|
@dannycjones I can do that, however the PR will expand into a lot of places. The For what it's worth I have a draft PR here where I moved everything across: #3068 . If that is preferable, I can close this PR and open that for review. |
I think that's the right approach - to me, we just chose the wrong type here so we should move those things across. |
|
@blackmwk and/or @CTTY, please can you check this is the right direction? I don't want to lead us on a larger change that we shouldn't make. I see that there's a few types even for V2 ( I am proposing to move from |
Which issue does this PR close?
This is a part of the upgrade to Avro 0.22. We currently serialise the manifest
first_row_idas au64, and this is incorrect and out of spec.From the Iceberg spec:
first_row_idis defined as along- see: https://iceberg.apache.org/spec/#manifest-lists64-bit signed integer- see: https://iceberg.apache.org/spec/#primitive-typesThis is relevant to the Avro 0.22 upgrade because:
in version 0.21, serialising a
u64as a long is allowed. It is silently coerced.in version 0.22, this fails and is rejected.
Closes some of Upgrade to using
apache-avro0.22 #3063I am making this change on it's own to help isolate changes (and to isolate discussion in case this is the wrong place, or changes elsewhere are needed).
What changes are included in this PR?
first_row_idas au64to ani64.Are these changes tested?
AI Disclosure
The code changes and this PR comment is all made by a human.
Claude was used to debug the issue, and as a search. This included in code, and in spec.