ldadima commented on code in PR #27508:
URL: https://github.com/apache/flink/pull/27508#discussion_r2844337238


##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/operators/join/stream/keyselector/AttributeBasedJoinKeyExtractor.java:
##########
@@ -288,11 +311,13 @@ private RowData buildKeyRowFromJoinedRow(
         for (int i = 0; i < keyExtractors.size(); i++) {
             keyRow.setField(i, 
keyExtractors.get(i).getLeftSideKey(joinedRowData));
         }
-        return keyRow;
+        return keySerializer.toBinaryRow(keyRow).copy();

Review Comment:
   Hi @twalthr 
   I agree about the extra copying. 
   It seems strange to me that we'll need to depend on the state backend type; 
I think it can be avoided. 
   Did you see the discussion above about the two implementation options: 
RowDataSerializer and BinaryWriter? Perhaps we should go back to the 
BinaryWriter solution (it's a small object and doesn't have any heavy, 
individual fields)?
   <img width="983" height="629" alt="image" 
src="https://github.com/user-attachments/assets/c8ca5dcd-3a8c-44f0-89f2-3191506b8d92";
 />
   
   What do you think about that?



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