Open bknbkn opened 1 month ago
The reason for this problem seems to be that each spec uses the latest schema, and historical specs may not be able to find fields in the latest schema.
I think it is necessary to persist the schma id into each spec in metadata.json. Based on this, each PartitionSpec can find its own schema when it is generated.
Apache Iceberg version
Master branch
Query engine
None
Please describe the bug 🐞
If we replaced or dropped partition spec field and drop the corresponding column, we can't select table again,
It can be easily reproduced if add
sql("SELECT * FROM %s", tableName);
inTestAlterTablePartitionFileds.testDropColumnOfOldPartitionFieldV1
orTestAlterTablePartitionFileds.testDropColumnOfOldPartitionFieldV2
Willingness to contribute