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/01/13 07:15:11 UTC

[GitHub] [iceberg] jackye1995 commented on a change in pull request #2081: Allow binary truncation length to be zero to handle evaluators that encounter empty string values

jackye1995 commented on a change in pull request #2081:
URL: https://github.com/apache/iceberg/pull/2081#discussion_r556296158



##########
File path: api/src/main/java/org/apache/iceberg/util/BinaryUtil.java
##########
@@ -28,12 +28,23 @@
   private BinaryUtil() {
   }
 
+  private static final ByteBuffer EMPTY_BYTE_BUFFER = ByteBuffer.allocate(0);
+
   /**
-   * Truncates the input byte buffer to the given length
+   * Truncates the input byte buffer to the given length.
+   * <p>
+   * We allow for a length of zero so that rows with empty string can be evaluated.
+   * Partition specs still cannot be created with a length of zero due to a constraint
+   * when parsing column truncation specs in org.apache.iceberg.MetricsModes.

Review comment:
       In that case, I think we can use `{@code}`




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

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