RussellSpitzer commented on a change in pull request #3459:
URL: https://github.com/apache/iceberg/pull/3459#discussion_r745807634
##########
File path:
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/source/SparkTable.java
##########
@@ -298,6 +311,103 @@ public void deleteWhere(Filter[] filters) {
}
}
+ @Override
+ public StructType partitionSchema() {
+ if (lazyPartitionSchema == null) {
+ Table table = table();
+ PartitionsTable partitionsTable =
+ (PartitionsTable)
MetadataTableUtils.createMetadataTableInstance(table,
MetadataTableType.PARTITIONS);
+ Types.NestedField partition =
partitionsTable.schema().findField("partition");
+ if (partition != null) {
+ this.lazyPartitionSchema = (StructType)
SparkSchemaUtil.convert(partition.type());
Review comment:
Just checking do we handle void transforms here correctly? V1 Tables
which have had a partition field removed leave this as a field in their spec
and I just want to make sure we don't expose these in a confusing way since
it's just an internal detail.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]