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 2023/01/09 22:24:55 UTC

[GitHub] [iceberg] puchengy opened a new pull request, #6552: Make "snapshot" a formal table property for snapshot table

puchengy opened a new pull request, #6552:
URL: https://github.com/apache/iceberg/pull/6552

   "snapshot" table property is set by spark snapshot action to indicate a table is snapshot table or not. 
   
   Per https://iceberg.apache.org/docs/latest/spark-procedures/#snapshot a snapshot table is not allowed for snapshot expiration operation. However, this restriction is not in place and such restriction is achieved by another property "gc.enabled".
   
   This diff implemented two things:
   1. add "snapshot" property into the table property lists
   2. reject any snapshot expiration when such table is a snapshot table (snapshot = true)


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


[GitHub] [iceberg] puchengy closed pull request #6552: Throw exception when snapshot expiration operation on snapshot table

Posted by GitBox <gi...@apache.org>.
puchengy closed pull request #6552: Throw exception when snapshot expiration operation on snapshot table
URL: https://github.com/apache/iceberg/pull/6552


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


[GitHub] [iceberg] puchengy commented on a diff in pull request #6552: Throw exception when snapshot expiration operation on snapshot table

Posted by GitBox <gi...@apache.org>.
puchengy commented on code in PR #6552:
URL: https://github.com/apache/iceberg/pull/6552#discussion_r1066080476


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/actions/SnapshotTableSparkAction.java:
##########
@@ -174,7 +174,7 @@ protected Map<String, String> destTableProps() {
 
     // make sure we mark this table as a snapshot table
     properties.put(TableProperties.GC_ENABLED, "false");

Review Comment:
   I think you said is right, I need to rethink this. Thanks for sharing your thought.



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


[GitHub] [iceberg] ajantha-bhat commented on a diff in pull request #6552: Make "snapshot" a formal table property for snapshot table and throw exception when snapshot expiration operation on snapshot table

Posted by GitBox <gi...@apache.org>.
ajantha-bhat commented on code in PR #6552:
URL: https://github.com/apache/iceberg/pull/6552#discussion_r1065340205


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/actions/SnapshotTableSparkAction.java:
##########
@@ -174,7 +174,7 @@ protected Map<String, String> destTableProps() {
 
     // make sure we mark this table as a snapshot table
     properties.put(TableProperties.GC_ENABLED, "false");

Review Comment:
   As `GC_ENABLED` is set to false (line 176) for this table created by snapshot action, expire snapshots and remove_orphan files will anyways not clean up the files. So, I am wondering why do we need one property that does the same thing? 



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