amitwdh commented on code in PR #14000:
URL: https://github.com/apache/iceberg/pull/14000#discussion_r2394499775
##########
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:
https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/io/PartitionedFanoutWriter.java#L58.
`protected abstract PartitionKey partition(T row)` is not allowed to return
null partition.
Why `PartitionedFanoutWriter.java` is allowed to process non-partitioned
data and as it's allowed as per current code why it's constructing data
location with assumption that partition list is non-empty which is adding one
extra forward slash in the file path?
In my opinion, either `PartitionedFanoutWriter.java` should not be allowed
to write non-partitioned data Or if it's allowed, it should construct the
correct data location.
Here, with this MR, I am trying to correct the behavior of
`PartitionedFanoutWriter.java` to construct the correct data location if use
pass the non-partitioned data to PartitionedFanoutWriter.
@RussellSpitzer Does above makes sense?
--
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]