Hi:

We found an inconsistency between java implementation and spec about
partition-spec and schema in v1 table.

In spec, it says in v1 table partition-spec and schema are required but
deprecated: https://iceberg.apache.org/spec/#table-metadata

While in java implementation, they are both optional. For schema, it checks
for `schemas` first, and looks up the current table schema by `schema-id`.
Otherwise it looks for a `schema` field. Similar things happen for
`partition spec`.

We found this problem when implementing iceberg-rust. To resolve this
inconsistency, there are two approaches:

1. Modify java implementation to match spec, e.g. force checking `schema`
and `partition spec` field.
2. Update spec to claim that both `schema` and `partition spec` are
optional for v1 table.

Personally I'm in favor of approach 2 as it keeps backward compatibility
and seems a more reasonable solution to me.

Looking forward to hearing from you!

Reply via email to