weijiii commented on issue #12971: URL: https://github.com/apache/iceberg/issues/12971#issuecomment-2864647911
> The problem is that the identifier fields rule (e.g. excluding FLOAT and DOUBLE types) is not enforced in your case? Yes, I would agree that it should be enforced, as floating numbers can exhibit differences across platforms and hence are not suitable for. > > `Schema` class already validate the field types of identifier fields. https://github.com/apache/iceberg/blob/main/api/src/main/java/org/apache/iceberg/Schema.java#L157 > > > It seems that [DeleteWriteBuilder::buildEqualityWriter](https://github.com/apache/iceberg/blob/696a72c0f88c3af1096e716b196f1609da34e50d/orc/src/main/java/org/apache/iceberg/orc/ORC.java#L605C40-L605C59) for all the formats should check on the constraints based on the schema and equalityFieldIds > > I am not sure we should add such enforcement to Parquet/Orc writer. > > It seems that In your case someone is producing the equality delete file with custom code using Iceberg Java SDK. Is the identifier fields set for the table schema? Validation above should fail such schema change. If a writer is not conforming to the spec, it is an implementation bug of the writer. @stevenzwu If we directly use the file format writers to write the delete files, then yes I think `FLOAT` / `DOUBLE` would be allowed right now. The case I am talking about is a struct type though. Could you help clarify if I am understanding the spec correctly, that nested types are also not allowed for both the identifier fields and equality delete columns? From [identifier-fields ](https://iceberg.apache.org/spec/?h=equality#identifier-field-ids) doc ``` A schema can optionally track the set of primitive fields that identify rows in a table, ``` Or is it allowed when that `struct` type is optional? Is it allowed to have a equality delete, e.g. ``` row = (1, 2, 'string') equality_ids=[1] 1: row | ---------------| (1, ,2, 'string') | ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org