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


##########
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:
   I have written own implementation of `PartitionedFanoutWriter<T>` when I try 
to pass the null `partitionKey` from `override fun partition(row: Record)` it 
fail with NPE at 
https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/io/PartitionedFanoutWriter.java#L58.
   It means we can't pass null `partitionKey`. There's needs to be first class 
way of knowing whether spec is partitioned or un-partitioned.



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