apache / iceberg-python

Apache PyIceberg
https://py.iceberg.apache.org/
Apache License 2.0
402 stars 147 forks source link

[bug] `table.inspect.partitions()` does not respect partition evolution #1120

Open kevinjqliu opened 1 month ago

kevinjqliu commented 1 month ago

Apache Iceberg version

main (development)

Please describe the bug 🐞

Notebook to repro https://gist.github.com/kevinjqliu/e3f454d829d8711ecf9909e11a20add6

Expectation: First, the table is partitioned by the timestamp field. After evolving the partition spec by adding the category field, table.inspect.partitions() should still use the table's old partition spec. Additionally, after adding data using the new partition spec, I should expect to see both old and new partition specs.