ktk1012 commented on issue #8013:
URL: https://github.com/apache/iceberg/issues/8013#issuecomment-1627615422

   With further investigation, I figured out that engine throws error due to 
missing `current-snapshot-id`.
   
   From v2 format [spec](https://iceberg.apache.org/spec/#table-metadata) is 
optional, but engine mandate `current-snapshot-id`.
   Also even spark also throws similar error. Is it valid behavior?
   
   ```
   23/07/09 14:54:32 WARN Tasks: Retrying task after failure: Cannot parse 
missing long: current-snapshot-id
   java.lang.IllegalArgumentException: Cannot parse missing long: 
current-snapshot-id
        at 
org.apache.iceberg.relocated.com.google.common.base.Preconditions.checkArgument(Preconditions.java:220)
        at org.apache.iceberg.util.JsonUtil.getLong(JsonUtil.java:133)
        at 
org.apache.iceberg.TableMetadataParser.fromJson(TableMetadataParser.java:436)
        at 
org.apache.iceberg.TableMetadataParser.fromJson(TableMetadataParser.java:303)
        at 
org.apache.iceberg.TableMetadataParser.read(TableMetadataParser.java:273)
        at 
org.apache.iceberg.TableMetadataParser.read(TableMetadataParser.java:266)
        at 
org.apache.iceberg.BaseMetastoreTableOperations.lambda$refreshFromMetadataLocation$0(BaseMetastoreTableOperations.java:189)
        at 
org.apache.iceberg.BaseMetastoreTableOperations.lambda$refreshFromMetadataLocation$1(BaseMetastoreTableOperations.java:208)
        at 
org.apache.iceberg.util.Tasks$Builder.runTaskWithRetry(Tasks.java:413)
        at 
org.apache.iceberg.util.Tasks$Builder.runSingleThreaded(Tasks.java:219)
        at org.apache.iceberg.util.Tasks$Builder.run(Tasks.java:203)
        at org.apache.iceberg.util.Tasks$Builder.run(Tasks.java:196)
   ```


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