RussellSpitzer commented on code in PR #14000:
URL: https://github.com/apache/iceberg/pull/14000#discussion_r2331210981


##########
core/src/main/java/org/apache/iceberg/io/BaseTaskWriter.java:
##########
@@ -327,7 +327,7 @@ public long currentRows() {
     }
 
     private void openCurrent() {
-      if (partitionKey == null) {
+      if (spec.isUnpartitioned() || partitionKey == null) {

Review Comment:
   @amitwdh The problem for me here is that we are essentially encoding a 
behavior which cannot be performed by our current implementations (and is 
actually forbidden.) If we have to make a new custom version of an existing 
class just which violates our preconditions to test a new behavior then that 
behavior probably should't be a part of the project.
   
   My concern here is that we are essentially testing the implementation 
behavior of something we explicitly are forbidding in the Iceberg 
implementation. The current code in Core basically says "null" should be used 
for unpartitioned (which is what we do in our current extensions) but it seems 
like your goal is to add a new behavior  of also accepting a non-null partition 
as long as it is unpartitioned. 
   
   My suggestion would be that your version of PartitionedWriter in your code 
should change the logic to just return null for partition if the partition is 
unpartitioned. At the moment i'm not sure we should be making this sort of 
modifications to the core behavior.



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