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 2020/04/09 22:39:34 UTC

[GitHub] [incubator-iceberg] rdblue opened a new pull request #910: Update Snapshot and TableMetadata with sequence numbers

rdblue opened a new pull request #910: Update Snapshot and TableMetadata with sequence numbers
URL: https://github.com/apache/incubator-iceberg/pull/910
 
 
   Adds sequence numbers to JSON metadata in the v2 write path.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-iceberg] aokolnychyi commented on a change in pull request #910: Update Snapshot and TableMetadata with sequence numbers

Posted by GitBox <gi...@apache.org>.
aokolnychyi commented on a change in pull request #910: Update Snapshot and TableMetadata with sequence numbers
URL: https://github.com/apache/incubator-iceberg/pull/910#discussion_r406941346
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/TableMetadata.java
 ##########
 @@ -197,14 +200,16 @@ public String toString() {
                 List<MetadataLogEntry> previousFiles) {
     Preconditions.checkArgument(formatVersion <= SUPPORTED_TABLE_FORMAT_VERSION,
         "Unsupported format version: v%s", formatVersion);
-    if (formatVersion > 1) {
-      Preconditions.checkArgument(uuid != null, "UUID is required in format v%s", formatVersion);
-    }
+    Preconditions.checkArgument(formatVersion == 1 || uuid != null,
+        "UUID is required in format v%s", formatVersion);
+    Preconditions.checkArgument(formatVersion > 1 || lastSequenceNumber == 0,
+        "Sequence number must be 0 in v1: %s", lastSequenceNumber);
 
 Review comment:
   So, v1 writers will only be allowed to write sequence numbers as 0 and we will assume 0 as sequence numbers in metadata entities without an explicit value, correct?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-iceberg] rdblue commented on a change in pull request #910: Update Snapshot and TableMetadata with sequence numbers

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #910: Update Snapshot and TableMetadata with sequence numbers
URL: https://github.com/apache/incubator-iceberg/pull/910#discussion_r406955677
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/TableMetadata.java
 ##########
 @@ -197,14 +200,16 @@ public String toString() {
                 List<MetadataLogEntry> previousFiles) {
     Preconditions.checkArgument(formatVersion <= SUPPORTED_TABLE_FORMAT_VERSION,
         "Unsupported format version: v%s", formatVersion);
-    if (formatVersion > 1) {
-      Preconditions.checkArgument(uuid != null, "UUID is required in format v%s", formatVersion);
-    }
+    Preconditions.checkArgument(formatVersion == 1 || uuid != null,
+        "UUID is required in format v%s", formatVersion);
+    Preconditions.checkArgument(formatVersion > 1 || lastSequenceNumber == 0,
+        "Sequence number must be 0 in v1: %s", lastSequenceNumber);
 
 Review comment:
   V1 writers should not pass any sequence number other than 0, and it won't get written to the file even though it is compatible. And reading v1 metadata should always fill in the sequence number with 0.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-iceberg] chenjunjiedada commented on issue #910: Update Snapshot and TableMetadata with sequence numbers

Posted by GitBox <gi...@apache.org>.
chenjunjiedada commented on issue #910: Update Snapshot and TableMetadata with sequence numbers
URL: https://github.com/apache/incubator-iceberg/pull/910#issuecomment-611964576
 
 
   Look great! +1.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-iceberg] chenjunjiedada edited a comment on issue #910: Update Snapshot and TableMetadata with sequence numbers

Posted by GitBox <gi...@apache.org>.
chenjunjiedada edited a comment on issue #910: Update Snapshot and TableMetadata with sequence numbers
URL: https://github.com/apache/incubator-iceberg/pull/910#issuecomment-611964576
 
 
   Look great! +1.
   
   I will rebase https://github.com/apache/incubator-iceberg/pull/588 once this get in.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-iceberg] aokolnychyi merged pull request #910: Update Snapshot and TableMetadata with sequence numbers

Posted by GitBox <gi...@apache.org>.
aokolnychyi merged pull request #910: Update Snapshot and TableMetadata with sequence numbers
URL: https://github.com/apache/incubator-iceberg/pull/910
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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