zhjwpku commented on PR #17106: URL: https://github.com/apache/iceberg/pull/17106#issuecomment-7166252793
> Hi @zhjwpku and @huan233usc, I agree that Java should avoid writing metadata it can’t reload. My concern is where the check happens. Java 1.11.0 and 1.12.0 already write non-finite float and double defaults as `"NaN"`, `"Infinity"`, and `"-Infinity"`. The reader also constructs a `NestedField` when loading a schema, so rejecting those values there would keep existing tables unreadable even after the parser learns to read them. > > `NaN` and both infinities are valid Iceberg floating-point row values. The open question is how to encode them as field defaults. Appendix D specifies JSON numbers for float and double, and JSON numbers cannot represent these three values. [Iceberg Appendix D](https://iceberg.apache.org/spec/#json-single-value-serialization), [RFC 8259 §6](https://www.rfc-editor.org/rfc/rfc8259#section-6). > > I opened [#19143](https://github.com/apache/iceberg/pull/19143) to address the immediate compatibility issue. It lets the Java schema reader recover initial-default and write-default from the three strings Java already emits. At [Fivetran](https://www.fivetran.com/), we’d favor recovering those tables now while the community decides on a portable encoding. If we decide to reject new non-finite defaults, could we apply that check when a default is added or changed, so existing metadata remains readable? Okay, I guess your fix makes this PR unnecessary. Can I close it? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
