aihuaxu commented on code in PR #13284:
URL: https://github.com/apache/iceberg/pull/13284#discussion_r2136977516


##########
core/src/main/java/org/apache/iceberg/variants/PrimitiveWrapper.java:
##########
@@ -114,7 +116,9 @@ public int sizeInBytes() {
         if (null == buffer) {
           this.buffer = ByteBuffer.wrap(((String) 
value).getBytes(StandardCharsets.UTF_8));
         }
-
+        if (((String) value).getBytes(StandardCharsets.UTF_8).length <= 
SHORT_STRING_LENGTH_MASK) {

Review Comment:
   Yeah. I also don't understand why we compare with SHORT_STRING_LENGTH_MASK. 
See https://github.com/apache/parquet-format/blob/master/VariantEncoding.md. 
   
   I think if the length < 64, then we can use short string encoding.



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

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


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

Reply via email to