rionmonster commented on code in PR #27549:
URL: https://github.com/apache/flink/pull/27549#discussion_r2776510743


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/data/binary/BinaryStringData.java:
##########
@@ -356,6 +356,11 @@ protected BinarySection materialize(TypeSerializer<String> 
serializer) {
     /** Copy a new {@code BinaryStringData}. */
     public BinaryStringData copy() {
         ensureMaterialized();
+        if (binarySection.segments.length == 1

Review Comment:
   Minor suggestion: Would it make sense to extract this optimization into a 
small `isCompact()` helper for readability? Or alternatively add a short 
comment to clarify the intent here?
   
   ```
   if (isCompact()) {
       return this;
   }
   ```



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

Reply via email to