advancedxy commented on code in PR #10352:
URL: https://github.com/apache/iceberg/pull/10352#discussion_r1676818347


##########
core/src/main/java/org/apache/iceberg/SchemaUpdate.java:
##########
@@ -533,6 +537,34 @@ private static Schema applyChanges(
       }
     }
 
+    Map<Integer, List<Integer>> specToDeletes = Maps.newHashMap();

Review Comment:
   > One aspect is on ordering of these. There are two ways of going about this:
   
   I don't think the ordering of getting these two functionality into the 
master really matter that much? As long as they are both merged before the next 
release(assuming we are saying Iceberg 1.7 release).  I imagine customer should 
use official released versions.
   
   > Here's a trivial case: Imagine a user just creates the table and they 
don't write any data. Then they realize they want to drop a partition column, 
but the procedure will fail unexpectedly whereas before it would work.
   
   If preventing dropping active partition source field and 
RemoveUnusedPartitionSpec are both landed. It's still possible to drop the just 
created table but with some additional but necessary steps:
   1. first remove the unwanted partition field, which will create a new 
PartitionSpec
   2. Call RemoveUnusedPartitionSpec, which should be able to remove the 
previous wrongly partition spec
   3. remove the wrongly partition source field.
   
   >  First get in the RemovedUnusedPartitionSpec procedure and then prevent 
dropping if it's part of a spec. The downside of this is, it may take some more 
time in to get the whole API in? 
   
   I think we can parallelize these two PRs if others all agree that's in the 
right direction.  BTW, I can help to work on 
https://github.com/apache/iceberg/pull/3462/files to get it merged in case 
@RussellSpitzer is busy and cannot work on that recently.



-- 
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-unsubscr...@iceberg.apache.org

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


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

Reply via email to