wypoon commented on a change in pull request #3373:
URL: https://github.com/apache/iceberg/pull/3373#discussion_r739593286
##########
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),
+ new SparkMetadataColumn(MetadataColumns.FILE_PATH.name(),
DataTypes.StringType, false),
+ new SparkMetadataColumn(MetadataColumns.ROW_POSITION.name(),
DataTypes.LongType, false)
Review comment:
I am not too familiar with the metadata columns, but I see 5 currently
defined in Iceberg's `MetadataColumns`. Is there a reason to omit `_deleted`
here? And it probably doesn't matter, but should we keep the columns in the
order defined in `MetadataColumns` (ordered by id from -1 to -5)?
--
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]