You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "smaheshwar-pltr (via GitHub)" <gi...@apache.org> on 2026/09/07 03:56:04 UTC

[PR] Spark: Reject `rewrite_table_path` for encrypted tables [iceberg]

smaheshwar-pltr opened a new pull request, #17988:
URL: https://github.com/apache/iceberg/pull/17988

   For an encrypted source table the rewrite completes and produces a target that cannot be read. Instead, we now reject encrypted tables in `validateInputs()`.


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


Re: [PR] Spark: Reject `rewrite_table_path` for encrypted tables [iceberg]

Posted by "smaheshwar-pltr (via GitHub)" <gi...@apache.org>.
smaheshwar-pltr commented on PR #17988:
URL: https://github.com/apache/iceberg/pull/17988#issuecomment-5564912111

   cc @singhpk234 @huaxingao @ggershinsky, PTAL 🙏 


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


Re: [PR] Spark: Reject `rewrite_table_path` for encrypted tables [iceberg]

Posted by "singhpk234 (via GitHub)" <gi...@apache.org>.
singhpk234 commented on code in PR #17988:
URL: https://github.com/apache/iceberg/pull/17988#discussion_r3954218722


##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteTablePathSparkAction.java:
##########
@@ -191,6 +192,9 @@ private void validateInputs() {
         !sourcePrefix.equals(targetPrefix),
         "Source prefix cannot be the same as target prefix (%s)",
         sourcePrefix);
+    Preconditions.checkArgument(
+        !(table.io() instanceof EncryptingFileIO),
+        "Cannot rewrite table paths for encrypted tables");

Review Comment:
   not producing a corrupted copy makes sense to me, but can you add a TODO .... 
   also what causes corruption here a small note would be helpful 
   
   Lets also discuss how can we support this scenario in the ticket



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


Re: [PR] Spark: Reject `rewrite_table_path` for encrypted tables [iceberg]

Posted by "singhpk234 (via GitHub)" <gi...@apache.org>.
singhpk234 merged PR #17988:
URL: https://github.com/apache/iceberg/pull/17988


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


Re: [PR] Spark: Reject `rewrite_table_path` for encrypted tables [iceberg]

Posted by "smaheshwar-pltr (via GitHub)" <gi...@apache.org>.
smaheshwar-pltr commented on PR #17988:
URL: https://github.com/apache/iceberg/pull/17988#issuecomment-5640902717

   Friendly ping here @singhpk234 @RussellSpitzer maybe, in case we can get this guard in for the next release? It would be great to fix this - I've included some context in this PR on why it's hard to "just implement it" (you need to propagate encryption metadata everywhere, it's quite a large change).


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


Re: [PR] Spark: Reject `rewrite_table_path` for encrypted tables [iceberg]

Posted by "smaheshwar-pltr (via GitHub)" <gi...@apache.org>.
smaheshwar-pltr commented on code in PR #17988:
URL: https://github.com/apache/iceberg/pull/17988#discussion_r3960132088


##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/actions/RewriteTablePathSparkAction.java:
##########
@@ -191,6 +192,9 @@ private void validateInputs() {
         !sourcePrefix.equals(targetPrefix),
         "Source prefix cannot be the same as target prefix (%s)",
         sourcePrefix);
+    Preconditions.checkArgument(
+        !(table.io() instanceof EncryptingFileIO),
+        "Cannot rewrite table paths for encrypted tables");

Review Comment:
   Makes sense, thanks. I've now tried to capture all this in a comment



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