aokolnychyi commented on a change in pull request #2984:
URL: https://github.com/apache/iceberg/pull/2984#discussion_r716868175
##########
File path: core/src/main/java/org/apache/iceberg/util/PartitionUtil.java
##########
@@ -51,6 +56,20 @@ private PartitionUtil() {
MetadataColumns.FILE_PATH.fieldId(),
convertConstant.apply(Types.StringType.get(), task.file().path()));
+ // add _spec_id
+ idToConstant.put(
+ MetadataColumns.SPEC_ID.fieldId(),
+ convertConstant.apply(Types.IntegerType.get(), task.file().specId()));
+
+ // add _partition
+ if (partitionType != null && partitionType.fields().size() > 0) {
+ StructLike coercedPartition = coercePartition(partitionType, spec,
partitionData);
+ idToConstant.put(MetadataColumns.PARTITION_COLUMN_ID,
convertConstant.apply(partitionType, coercedPartition));
Review comment:
Yeah, it is also related to unknown transforms as well.
##########
File path: core/src/main/java/org/apache/iceberg/util/PartitionUtil.java
##########
@@ -51,6 +56,20 @@ private PartitionUtil() {
MetadataColumns.FILE_PATH.fieldId(),
convertConstant.apply(Types.StringType.get(), task.file().path()));
+ // add _spec_id
+ idToConstant.put(
+ MetadataColumns.SPEC_ID.fieldId(),
+ convertConstant.apply(Types.IntegerType.get(), task.file().specId()));
+
+ // add _partition
+ if (partitionType != null && partitionType.fields().size() > 0) {
+ StructLike coercedPartition = coercePartition(partitionType, spec,
partitionData);
+ idToConstant.put(MetadataColumns.PARTITION_COLUMN_ID,
convertConstant.apply(partitionType, coercedPartition));
Review comment:
Yeah, it is also related to unknown transforms.
--
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]