Open mgmarino opened 1 week ago
Based on the stacktrace, looks like partitions table need to evaluate all historical partition specs to build the partition value per #7551 , but since the column is already dropped from current schema. I am not sure if old partition spec is reference to the old schema or current table schema for looking up the source field id, if it's current I think it would be the cause of NPE. FYI @szehon-ho for better insight
Hi, same issues in 10234
@lurnagao-dahua thanks for linking that, I did not find it when searching. I see a few things possibly different here (though of course the underlying cause could be the same):
sc.table("catalog.db.table.all_manifests").filter("partition_spec_id != 1")
returns no rows. sc.table("catalog.db.table.partitions").filter("spec_id != 1")
is also emptyrewrite_data_files
and any snapshots that referenced old partitions have been expired/removed for some time.
Apache Iceberg version
1.5.2 (latest release)
Query engine
Spark
Please describe the bug š
We have an iceberg table where we have changed the partitioning, going from an identity partition to hidden partitioning.
The partition specs are defined in the metadata json file:
We did this evolution quite some time ago (I can't unfortunately remember which version of Iceberg we were using at the point we changed the partitioning), and are now trying to clean up the table by removing the old
day
column. Running aDROP COLUMN
in spark (3.5.1, using Iceberg 1.5.2) succeeds, but then a subsequent read on the table, or e.g. the partitions metadata table results in:This fails in Spark, but writes/commits from Flink (1.18.1, also using Iceberg 1.5.2) also fail following this change. There the stack trace looks like:
We are using the AWS Glue Catalog to store information about the table. Here are the current table properties set:
The only way for us to recover was to force the table to point to the metadata file right before the change.
I can provide the two metadata files if that's helpful, but I would rather do that privately if possible.
This seems quite similar to #7386, the table was initially written using Iceberg 1.2.1.
Please let me know if I can provide any other information!