JinkunLiu commented on code in PR #27017:
URL: https://github.com/apache/flink/pull/27017#discussion_r2369433929


##########
flink-core/src/main/java/org/apache/flink/types/variant/BinaryVariantInternalBuilder.java:
##########
@@ -290,7 +290,7 @@ public void appendTimestamp(long microsSinceEpoch) {
     public void appendFloat(float f) {
         checkCapacity(1 + 4);
         writeBuffer[writePos++] = primitiveHeader(FLOAT);
-        writeLong(writeBuffer, writePos, Float.floatToIntBits(f), 8);
+        writeLong(writeBuffer, writePos, Float.floatToIntBits(f), 4);

Review Comment:
   The name of `writeLong` function might be misleading. The writeLong function 
does not always write 8 bytes. Its actual functionality is to write 
Float.floatToIntBits(f) into writeBuffer[writePos, writePos + numBytes). 
Similarly, you can refer to Line 198



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

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

Reply via email to