You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/09/02 05:24:14 UTC

[GitHub] [iceberg] xinbinhuang commented on a change in pull request #3059: Returns UnpartitionedSpec for VoidTransform on all fields

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



##########
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'm quite new to Java, so my opinion may not align with convention. Just from a personal perspective, I don't see any harm to have all `Transform` implementation public as they share the same methods as the interface. BTW, are there any specific reasons to hide them initially (e.g. project is in the early stage and not stable so we can change them without breaking users)? 




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

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



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