You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/08/08 23:11:46 UTC

[GitHub] [iceberg] szehon-ho commented on a diff in pull request #4898: Core: Add schema_id to ContentFile/ManifestFile

szehon-ho commented on code in PR #4898:
URL: https://github.com/apache/iceberg/pull/4898#discussion_r940733614


##########
core/src/main/java/org/apache/iceberg/BaseFile.java:
##########
@@ -54,6 +54,7 @@ public PartitionData copy() {
   private Types.StructType partitionType;
 
   private Long fileOrdinal = null;
+  private int schemaId = -1;

Review Comment:
   I think partitionSpecId is different because that's a derived field. Slightly prefer Integer more reflects what's persisted on disk.



##########
core/src/main/java/org/apache/iceberg/deletes/EqualityDeleteWriter.java:
##########
@@ -42,18 +42,26 @@
   private final ByteBuffer keyMetadata;
   private final int[] equalityFieldIds;
   private final SortOrder sortOrder;
+  private final int schemaId;
   private DeleteFile deleteFile = null;
 
   public EqualityDeleteWriter(FileAppender<T> appender, FileFormat format, String location,
                               PartitionSpec spec, StructLike partition, EncryptionKeyMetadata keyMetadata,
                               SortOrder sortOrder, int... equalityFieldIds) {
+    this(appender, format, location, spec, partition, keyMetadata, sortOrder, -1, equalityFieldIds);

Review Comment:
   I'm not a huge fan of it, I think we can have a builder like SparkAppenderFactory (where we did some refactor to not have one constructor per new argument)



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org