RussellSpitzer commented on a change in pull request #3059:
URL: https://github.com/apache/iceberg/pull/3059#discussion_r700591049



##########
File path: api/src/main/java/org/apache/iceberg/PartitionSpec.java
##########
@@ -95,7 +95,7 @@ public int specId() {
   }
 
   public boolean isUnpartitioned() {
-    return fields.length < 1;
+    return fields.length < 1 || fields.stream().allMatch(f -> 
f.transform().getClass() == Transforms.alwaysNull().class);

Review comment:
       I think this is the right idea, but we'll definitely need to add in some 
tests as well.  I also wonder if we should just make the NullTransform more 
public so we can just check allMatch(f.transform().instanceOf[NullTransform]) 
or something




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