rdblue commented on a change in pull request #3373:
URL: https://github.com/apache/iceberg/pull/3373#discussion_r739888730



##########
File path: 
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/source/SparkTable.java
##########
@@ -168,6 +174,17 @@ public StructType schema() {
     return CAPABILITIES;
   }
 
+  @Override
+  public MetadataColumn[] metadataColumns() {
+    DataType sparkPartitionType = 
SparkSchemaUtil.convert(Partitioning.partitionType(table()));
+    return new MetadataColumn[] {
+        new SparkMetadataColumn(MetadataColumns.SPEC_ID.name(), 
DataTypes.IntegerType, false),
+        new SparkMetadataColumn(MetadataColumns.PARTITION_COLUMN_NAME, 
sparkPartitionType, true),

Review comment:
       I like that we can project the partition. I've been meaning to add a way 
to project the individual partition fields, but this is probably way easier.




-- 
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]

Reply via email to